Skip to content

Commit 1e38e00

Browse files
committed
y is always defined
1 parent 924b74d commit 1e38e00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/array_api_extra/_funcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ def get(
759759
def _update_common(
760760
self,
761761
at_op: str,
762-
y: Array = _undef,
762+
y: Array,
763763
/,
764764
copy: bool | None = True,
765765
xp: ModuleType | None = None,
@@ -783,8 +783,8 @@ def _update_common(
783783
if copy:
784784
if is_jax_array(x):
785785
# Use JAX's at[] or other library that with the same duck-type API
786-
func = getattr(x.at[self._idx], at_op)
787-
return func(y) if y is not _undef else func(), None
786+
func = getattr(x.at[idx], at_op)
787+
return func(y), None
788788
# Emulate at[] behaviour for non-JAX arrays
789789
# with a copy followed by an update
790790
if xp is None:

0 commit comments

Comments
 (0)