Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion named_arrays/_functions/tests/test_functions_vertices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions named_arrays/_scalars/scalar_array_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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),
)
Expand Down
2 changes: 1 addition & 1 deletion named_arrays/_scalars/scalars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
6 changes: 3 additions & 3 deletions named_arrays/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down
Loading