Skip to content

Commit

Permalink
Fix np.float_ to np.float64 while using numpy >= 2.0 (ManimCommunity#…
Browse files Browse the repository at this point in the history
…3940)

Co-authored-by: Geoo Chi <[email protected]>
  • Loading branch information
geoochi and Geoo Chi authored Oct 4, 2024
1 parent 1dcb812 commit d6f066c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manim/utils/iterables.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

T = TypeVar("T")
U = TypeVar("U")
F = TypeVar("F", np.float_, np.int_)
F = TypeVar("F", np.float64, np.int_)
H = TypeVar("H", bound=Hashable)


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


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

0 comments on commit d6f066c

Please sign in to comment.