diff --git a/.circleci/config.yml b/.circleci/config.yml index e7348b868d4b..40ba933cf0d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,7 @@ commands: parameters: numpy_version: type: string - default: "~=2.0.0" + default: "" steps: - run: name: Install Python dependencies diff --git a/environment.yml b/environment.yml index 7b9ff51ae325..7593700f247a 100644 --- a/environment.yml +++ b/environment.yml @@ -18,7 +18,7 @@ dependencies: - kiwisolver>=1.3.1 - pybind11>=2.13.2 - meson-python>=0.13.1 - - numpy<2.1 + - numpy - pillow>=9 - pkg-config - pygobject diff --git a/galleries/examples/units/basic_units.py b/galleries/examples/units/basic_units.py index 3f64d145b65e..486918a8eafc 100644 --- a/galleries/examples/units/basic_units.py +++ b/galleries/examples/units/basic_units.py @@ -193,6 +193,11 @@ def get_unit(self): class BasicUnit: + # numpy scalars convert eager and np.float64(2) * BasicUnit('cm') + # would thus return a numpy scalar. To avoid this, we increase the + # priority of the BasicUnit. + __array_priority__ = np.float64(0).__array_priority__ + 1 + def __init__(self, name, fullname=None): self.name = name if fullname is None: