Skip to content

Commit

Permalink
test assign to a view
Browse files Browse the repository at this point in the history
  • Loading branch information
tkarna committed Jan 9, 2025
1 parent a82a1db commit 87ec64d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_manip.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ def test_reshape_copy(self):
assert numpy.allclose(sp.to_numpy(a), [20, 1, 2, 3, 4, 5, 6, 7])
assert numpy.allclose(sp.to_numpy(b), [[0, 1], [2, 3], [4, 5], [6, 7]])

def test_view_assign(self):
a = sp.arange(0, 8, 1, sp.int32)
b = a[1:7]
b[0:4] = 22
assert numpy.allclose(sp.to_numpy(a), [0, 22, 22, 22, 22, 5, 6, 7])
assert numpy.allclose(sp.to_numpy(b), [22, 22, 22, 22, 5, 6])

@pytest.mark.skipif(len(device), reason="FIXME 64bit on GPU")
def test_astype_f64i32(self):
def doit(aapi, **kwargs):
Expand Down

0 comments on commit 87ec64d

Please sign in to comment.