We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a46b32 commit eacef41Copy full SHA for eacef41
numpy/_core/tests/test_numeric.py
@@ -324,15 +324,17 @@ def test_take(self):
324
out = np.take(a, indices)
325
assert_equal(out, tgt)
326
327
- pairs = [(np.int32, np.int32), (np.int32, np.int64), (np.int64, np.int32), (np.int64, np.int64)]
+ pairs = [
328
+ (np.int32, np.int32), (np.int32, np.int64),
329
+ (np.int64, np.int32), (np.int64, np.int64)
330
+ ]
331
for array_type, indices_type in pairs:
- x = np.array([1, 2, 3, 4, 5], dtype=array_type)
- ind = np.array([0, 2, 2, 3], dtype=indices_type )
- tgt = np.array([1, 3, 3, 4], dtype=array_type)
332
- out = np.take(x, ind)
333
- assert_equal(out, tgt)
334
- assert_equal(out.dtype, tgt.dtype)
335
-
+ x = np.array([1, 2, 3, 4, 5], dtype=array_type)
+ ind = np.array([0, 2, 2, 3], dtype=indices_type)
+ tgt = np.array([1, 3, 3, 4], dtype=array_type)
+ out = np.take(x, ind)
336
+ assert_equal(out, tgt)
337
+ assert_equal(out.dtype, tgt.dtype)
338
339
def test_trace(self):
340
c = [[1, 2], [3, 4], [5, 6]]
0 commit comments