Skip to content
Snippets Groups Projects
Commit f20fbbc7 authored by Arin Wongprommoon's avatar Arin Wongprommoon
Browse files

test(aliby): fix numpy array comparison in test_image

WHY IS THIS CHANGE NEEDED?:
- https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/-/jobs/56767 failed
  because ValueError: The truth value of a Array is ambiguous.

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- use numpy.array_equal() to compare arrays instead

REFERENCES:
- issue #53
parent 0f30c66d
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,6 @@ def test_pad_array(sample_da, dim, n_empty_slices):
]
# Checks that original image array is there and is at the last index
assert padded_da.compute()[ix] == sample_da
assert np.array_equal(padded_da.compute()[ix], sample_da)
# Checks that the additional axis is extended correctly
assert padded_da.compute.shape[dim] == n_empty_slices + 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment