Skip to content

Commit 6aff89e

Browse files
committed
Remove apply
1 parent 6455f69 commit 6aff89e

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

array_api_compat/common/_helpers.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -996,18 +996,6 @@ def set(self, y, /, **kwargs):
996996
x[self.idx] = y
997997
return x
998998

999-
def apply(self, ufunc, /, **kwargs):
1000-
"""ufunc.at(x, idx)"""
1001-
if is_cupy_array(self.x) or is_torch_array(self.x) or is_dask_array(self.x):
1002-
# ufunc.at not implemented
1003-
return self.set(ufunc(self.x[self.idx]), **kwargs)
1004-
1005-
res, x = self._common("apply", ufunc, **kwargs)
1006-
if res is not None:
1007-
return res
1008-
ufunc.at(x, self.idx)
1009-
return x
1010-
1011999
def _iop(
10121000
self, at_op: str, elwise_op: Callable[[Array, Array], Array], y: Array, **kwargs
10131001
):

tests/test_at.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def x(request):
6363
@pytest.mark.parametrize(
6464
"op,arg,expect",
6565
[
66-
("apply", np.negative, [10, -20, -30]),
6766
("set", 40, [10, 40, 40]),
6867
("add", 40, [10, 60, 70]),
6968
("subtract", 100, [10, -80, -70]),

0 commit comments

Comments
 (0)