diff --git a/named_arrays/_functions/tests/test_functions_vertices.py b/named_arrays/_functions/tests/test_functions_vertices.py index a8bc1f70..a4bec356 100644 --- a/named_arrays/_functions/tests/test_functions_vertices.py +++ b/named_arrays/_functions/tests/test_functions_vertices.py @@ -179,7 +179,7 @@ def test_reshape(self, array: na.AbstractArray, newshape: dict[str, int]): for ax in newshape: if ax in array.axes_vertex or (ax not in array.axes and len(array.axes_vertex) != 0): with pytest.raises(ValueError): - result = np.reshape(a=array, newshape=newshape) + result = np.reshape(array, newshape=newshape) return super().test_reshape(array, newshape) diff --git a/named_arrays/_scalars/scalar_array_functions.py b/named_arrays/_scalars/scalar_array_functions.py index 3626b2bd..39074bfb 100644 --- a/named_arrays/_scalars/scalar_array_functions.py +++ b/named_arrays/_scalars/scalar_array_functions.py @@ -946,8 +946,8 @@ def diff( ) -@implements(np.char.mod) -def char_mod( +@implements(np.strings.mod) +def strings_mod( a: str | na.AbstractScalarArray, values: str | na.AbstractScalarArray, ) -> na.ScalarArray: @@ -960,7 +960,7 @@ def char_mod( shape = na.shape_broadcasted(a, values) - result_ndarray = np.char.mod( + result_ndarray = np.strings.mod( a=a.ndarray_aligned(shape), values=values.ndarray_aligned(shape), ) diff --git a/named_arrays/_scalars/scalars.py b/named_arrays/_scalars/scalars.py index 36a444f6..33c3e928 100644 --- a/named_arrays/_scalars/scalars.py +++ b/named_arrays/_scalars/scalars.py @@ -325,7 +325,7 @@ def to_string_array( if unit is not None: a = f"{a}{pad_unit}{unit:{format_unit}}" - return np.char.mod( + return np.strings.mod( a=a, values=self.value, ) diff --git a/named_arrays/tests/test_core.py b/named_arrays/tests/test_core.py index 34db3da8..0b0a85a6 100644 --- a/named_arrays/tests/test_core.py +++ b/named_arrays/tests/test_core.py @@ -862,7 +862,7 @@ def test_moveaxis( @pytest.mark.parametrize('newshape', [dict(r=-1)]) def test_reshape(self, array: na.AbstractArray, newshape: dict[str, int]): - result = np.reshape(a=array, newshape=newshape) + result = np.reshape(array, newshape=newshape) assert result.size == array.size assert result.axes == tuple(newshape.keys()) @@ -1128,8 +1128,8 @@ def test_diff_1st_order( "%.2f", ] ) - def test_char_mod(self, array: na.AbstractArray, a: na.AbstractArray): - result = np.char.mod(a, array) + def test_strings_mod(self, array: na.AbstractArray, a: na.AbstractArray): + result = np.strings.mod(a, array) assert isinstance(result, na.AbstractArray) @pytest.mark.parametrize( diff --git a/pyproject.toml b/pyproject.toml index a23b7667..02ef5a73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,13 +16,13 @@ classifiers = [ ] dependencies = [ "typing_extensions", - "numpy<2", + "numpy>2", "matplotlib", "scipy", "astropy", "astroscrappy", - "ndfilters==0.3.1", - "colorsynth==0.1.5", + "ndfilters==0.3.2", + "colorsynth==0.1.6", "regridding==0.2.0", "xarray", ]