Commit c1b16c8
committed
TST: test that clip(x) returns a copy not a view
The spec only says that "If both min and max are None, the elements of
the returned array must equal the respective elements in x"
Bare NumPy 2.x and CuPy 13.x return copes:
>>> x = np.arange(8); np.may_share_memory(x, np.clip(x))
False
Thus assume that all wrapped libraries should return a copy, too.
Add a test to this effect.1 parent dd6d3e8 commit c1b16c8
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments