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

Method test_solo

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

Source from the content-addressed store, hash-verified

456 return w, x, y, z
457
458 def test_solo(self):
459 # Test merge_arrays on a single array.
460 _, x, _, z = self._create_arrays()
461
462 test = merge_arrays(x)
463 control = np.array([(1,), (2,)], dtype=[('f0', int)])
464 assert_equal(test, control)
465 test = merge_arrays((x,))
466 assert_equal(test, control)
467
468 test = merge_arrays(z, flatten=False)
469 assert_equal(test, z)
470 test = merge_arrays(z, flatten=True)
471 assert_equal(test, z)
472
473 def test_solo_w_flatten(self):
474 # Test merge_arrays on a single array w & w/o flattening

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
merge_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected