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

Method test_w_shorter_flex

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

Source from the content-addressed store, hash-verified

550 assert_equal(test, control)
551
552 def test_w_shorter_flex(self):
553 # Test merge_arrays w/ a shorter flexndarray.
554 z = self._create_arrays()[-1]
555
556 # Fixme, this test looks incomplete and broken
557 #test = merge_arrays((z, np.array([10, 20, 30]).view([('C', int)])))
558 #control = np.array([('A', 1., 10), ('B', 2., 20), ('-1', -1, 20)],
559 # dtype=[('A', '|S3'), ('B', float), ('C', int)])
560 #assert_equal(test, control)
561
562 merge_arrays((z, np.array([10, 20, 30]).view([('C', int)])))
563 np.array([('A', 1., 10), ('B', 2., 20), ('-1', -1, 20)],
564 dtype=[('A', '|S3'), ('B', float), ('C', int)])
565
566 def test_singlerecord(self):
567 _, x, y, z = self._create_arrays()

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
merge_arraysFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected