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

Method test_w_singlefield

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

Source from the content-addressed store, hash-verified

541 assert_(isinstance(test, MaskedRecords))
542
543 def test_w_singlefield(self):
544 # Test single field
545 test = merge_arrays((np.array([1, 2]).view([('a', int)]),
546 np.array([10., 20., 30.])),)
547 control = ma.array([(1, 10.), (2, 20.), (-1, 30.)],
548 mask=[(0, 0), (0, 0), (1, 0)],
549 dtype=[('a', int), ('f1', float)])
550 assert_equal(test, control)
551
552 def test_w_shorter_flex(self):
553 # Test merge_arrays w/ a shorter flexndarray.

Callers

nothing calls this directly

Calls 3

merge_arraysFunction · 0.90
assert_equalFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected