From fb4d47f84e3d7468d16ccdee06a8af4b45db3686 Mon Sep 17 00:00:00 2001 From: Wessel Bruinsma Date: Sun, 23 Jun 2024 19:50:42 +0200 Subject: [PATCH] Fix NumPy 2.0 compatibility --- lab/types.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lab/types.py b/lab/types.py index 18231e9..d9f7b1e 100644 --- a/lab/types.py +++ b/lab/types.py @@ -4,7 +4,6 @@ import numpy as np from plum import ( ModuleType, - activate_union_aliases, add_conversion_method, add_promotion_rule, convert, @@ -96,11 +95,11 @@ def _module_attr(module, attr): _jax_device = ModuleType("jaxlib.xla_extension", "Device") # Numeric types: -Int = Union[tuple([int, Dimension] + np.sctypes["int"] + np.sctypes["uint"])] +Int = Union[tuple([int, Dimension] + np.core.sctypes["int"] + np.core.sctypes["uint"])] Int = set_union_alias(Int, "B.Int") -Float = Union[tuple([float] + np.sctypes["float"])] +Float = Union[tuple([float] + np.core.sctypes["float"])] Float = set_union_alias(Float, "B.Float") -Complex = Union[tuple([complex] + np.sctypes["complex"])] +Complex = Union[tuple([complex] + np.core.sctypes["complex"])] Complex = set_union_alias(Complex, "B.Complex") Bool = Union[bool, np.bool_] Bool = set_union_alias(Bool, "B.Bool")