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

Method test_w_singlefield

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

Source from the content-addressed store, hash-verified

534 assert_(isinstance(test, MaskedRecords))
535
536 def test_w_singlefield(self):
537 # Test single field
538 test = merge_arrays((np.array([1, 2]).view([('a', int)]),
539 np.array([10., 20., 30.])),)
540 control = ma.array([(1, 10.), (2, 20.), (-1, 30.)],
541 mask=[(0, 0), (0, 0), (1, 0)],
542 dtype=[('a', int), ('f1', float)])
543 assert_equal(test, control)
544
545 def test_w_shorter_flex(self):
546 # 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