Skip to content

Commit

Permalink
TST: Adapt to __array__(copy=True)
Browse files Browse the repository at this point in the history
[skip circle]
  • Loading branch information
thalassemia committed Apr 19, 2024
1 parent 561376c commit 342a2c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scipy/linalg/_testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def __init__(self, data):
self._data = data

def __array__(self, dtype=None, copy=None):
if copy:
return self._data.copy()
return self._data


Expand Down
2 changes: 1 addition & 1 deletion scipy/optimize/_nonlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def __array__(self, dtype=None, copy=None):

def collapse(self):
"""Collapse the low-rank matrix to a full-rank one."""
self.collapsed = np.array(self)
self.collapsed = np.array(self, copy=None)
self.cs = None
self.ds = None
self.alpha = None
Expand Down

0 comments on commit 342a2c2

Please sign in to comment.