Skip to content

Commit

Permalink
MAINT: copy before matmul in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdhaber committed Dec 12, 2024
1 parent b62798d commit c1d28eb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 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 @@ -925,9 +925,12 @@ 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
seed = 87597311899020256922680472523907945305
test_array_binary(array_binary[0], dtype='float32', xp=np, seed=seed)

def test_test():
seed = 87597311899020256922680472523907945305
Expand Down

0 comments on commit c1d28eb

Please sign in to comment.