summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorCameron Blocker <cameronjblocker@gmail.com>2020-07-13 16:41:33 -0400
committerGitHub <noreply@github.com>2020-07-13 16:41:33 -0400
commitf82c7d73ce116471f8009d481ded4449dfec3106 (patch)
tree8ad39895b6f8c9648dc2343a73eb0b230b9ef3c3 /numpy/lib/tests/test_index_tricks.py
parent5d1fbf4df4233d38844acc33aa3116fd19729d6e (diff)
downloadnumpy-f82c7d73ce116471f8009d481ded4449dfec3106.tar.gz
TST: update mgrid test from code review
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-rw-r--r--numpy/lib/tests/test_index_tricks.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 4f933a683..64e744a50 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -263,12 +263,14 @@ class TestGrid:
assert_array_almost_equal(grid64, grid32)
def test_accepts_npcomplexfloating(self):
- grid = mgrid[0.1:0.3:np.complex64(3j), ]
- assert_array_almost_equal(grid, np.array([[0.1, 0.2, 0.3]]))
+ assert_array_almost_equal(
+ mgrid[0.1:0.3:3j, ], mgrid[0.1:0.3:np.complex64(3j), ]
+ )
# different code path for single slice
- grid = mgrid[0.1:0.3:np.complex64(3j)]
- assert_array_almost_equal(grid, np.array([0.1, 0.2, 0.3]))
+ assert_array_almost_equal(
+ mgrid[0.1:0.3:3j], mgrid[0.1:0.3:np.complex64(3j)]
+ )
class TestConcatenator:
def test_1d(self):