@@ -1938,32 +1938,24 @@ def pointwise_become_partial(
1938
1938
upper_residue ,
1939
1939
)
1940
1940
else :
1941
- # Copy points if self.points is vmobject.points before setting
1942
- # self.points = np.empty(...) to avoid in-place modification
1943
- vmobject_points = (
1944
- vmobject .points .copy ()
1945
- if self .points is vmobject .points
1946
- else vmobject .points
1947
- )
1948
-
1949
1941
# Allocate space for (upper_index-lower_index+1) Bézier curves.
1950
1942
self .points = np .empty ((nppc * (upper_index - lower_index + 1 ), self .dim ))
1951
1943
# Look at the "lower_index"-th Bezier curve and select its part from
1952
1944
# t=lower_residue to t=1. This is the first curve in self.points.
1953
1945
self .points [:nppc ] = partial_bezier_points (
1954
- vmobject_points [nppc * lower_index : nppc * (lower_index + 1 )],
1946
+ vmobject . points [nppc * lower_index : nppc * (lower_index + 1 )],
1955
1947
lower_residue ,
1956
1948
1 ,
1957
1949
)
1958
1950
# If there are more curves between the "lower_index"-th and the
1959
1951
# "upper_index"-th Béziers, add them all to self.points.
1960
- self .points [nppc :- nppc ] = vmobject_points [
1952
+ self .points [nppc :- nppc ] = vmobject . points [
1961
1953
nppc * (lower_index + 1 ) : nppc * upper_index
1962
1954
]
1963
1955
# Look at the "upper_index"-th Bézier curve and select its part from
1964
1956
# t=0 to t=upper_residue. This is the last curve in self.points.
1965
1957
self .points [- nppc :] = partial_bezier_points (
1966
- vmobject_points [nppc * upper_index : nppc * (upper_index + 1 )],
1958
+ vmobject . points [nppc * upper_index : nppc * (upper_index + 1 )],
1967
1959
0 ,
1968
1960
upper_residue ,
1969
1961
)
0 commit comments