MCPcopy Create free account
hub / github.com/numpy/numpy / test_solo

Method test_solo

numpy/lib/tests/test_recfunctions.py:450–463  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

448 self.data = (w, x, y, z)
449
450 def test_solo(self):
451 # Test merge_arrays on a single array.
452 (_, x, _, z) = self.data
453
454 test = merge_arrays(x)
455 control = np.array([(1,), (2,)], dtype=[('f0', int)])
456 assert_equal(test, control)
457 test = merge_arrays((x,))
458 assert_equal(test, control)
459
460 test = merge_arrays(z, flatten=False)
461 assert_equal(test, z)
462 test = merge_arrays(z, flatten=True)
463 assert_equal(test, z)
464
465 def test_solo_w_flatten(self):
466 # Test merge_arrays on a single array w & w/o flattening

Callers

nothing calls this directly

Calls 2

merge_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected