Skip to content

Commit

Permalink
Merge pull request #39 from mdhaber/gh33
Browse files Browse the repository at this point in the history
MAINT: copy before matmul in `test_array_binary`
  • Loading branch information
mdhaber authored Dec 12, 2024
2 parents e91fb0e + 155861d commit 8825d03
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions marray/tests/test_marray.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_array_binary(f, dtype, xp, seed=None):
x = masked_arrays[0].data
mask = masked_arrays[0].mask
x[mask] = 0
data = f(x, x.mT)
data = f(x, x.mT.copy()) # .copy to prevent gh-33
mask = ~f(~mask, ~mask.mT)
ref = np.ma.masked_array(data, mask=mask)
assert_allclose(res, ref, seed=seed, xp=xp, rtol=get_rtol(dtype, xp))
Expand Down Expand Up @@ -918,9 +918,11 @@ def test_signature_docs():
# - investigate asarray - is copy respected?
# - investigate test_sorting - what about uint dtypes?

# def failing_test():
# seed = 87597311899020256922680472523907945305
# test_array_binary(array_binary[0], dtype=np.float32, xp=np, seed=seed)
### Bug-fix tests

def test_gh33():
# See https://github.com/mdhaber/marray/issues/33
test_array_binary(array_binary[0], dtype='float32', xp=np, seed=566)

def test_test():
seed = 87597311899020256922680472523907945305
Expand Down

0 comments on commit 8825d03

Please sign in to comment.