Skip to content

Commit d6f066c

Browse files
geoochiGeoo Chi
and
Geoo Chi
authored
Fix np.float_ to np.float64 while using numpy >= 2.0 (#3940)
Co-authored-by: Geoo Chi <[email protected]>
1 parent 1dcb812 commit d6f066c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

manim/utils/iterables.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
T = TypeVar("T")
3535
U = TypeVar("U")
36-
F = TypeVar("F", np.float_, np.int_)
36+
F = TypeVar("F", np.float64, np.int_)
3737
H = TypeVar("H", bound=Hashable)
3838

3939

@@ -311,8 +311,8 @@ def resize_array(nparray: npt.NDArray[F], length: int) -> npt.NDArray[F]:
311311

312312

313313
def resize_preserving_order(
314-
nparray: npt.NDArray[np.float_], length: int
315-
) -> npt.NDArray[np.float_]:
314+
nparray: npt.NDArray[np.float64], length: int
315+
) -> npt.NDArray[np.float64]:
316316
"""Extends/truncates nparray so that ``len(result) == length``.
317317
The elements of nparray are duplicated to achieve the desired length
318318
(favours earlier elements).

0 commit comments

Comments
 (0)