Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Dec 11, 2024
1 parent 2b18097 commit 41ad0bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/array_api_extra/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,8 @@ def get(
copy: bool | None = True,
xp: ModuleType | None = None,
) -> Array:
"""Return ``xp.asarray(x[idx])``. In addition to plain ``__getitem__``, this allows
ensuring that the output is either a copy or a view; it also allows passing
keyword arguments to the backend.
"""Return ``xp.asarray(x[idx])``. In addition to plain ``__getitem__``,
this allows ensuring that the output is either a copy or a view
"""
self._check_args(copy=copy)
x = self.x
Expand Down Expand Up @@ -782,7 +781,7 @@ def _update_common(
writeable = is_writeable_array(x)
if not writeable:
# sparse crashes here
msg = f"Array {x} has no `at` method and is read-only"
msg = f"Can't update read-only array {x}"
raise ValueError(msg)

return None, x
Expand Down

0 comments on commit 41ad0bb

Please sign in to comment.