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

Method test_w_shorter_flex

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

Source from the content-addressed store, hash-verified

543 assert_equal(test, control)
544
545 def test_w_shorter_flex(self):
546 # Test merge_arrays w/ a shorter flexndarray.
547 z = self.data[-1]
548
549 # Fixme, this test looks incomplete and broken
550 #test = merge_arrays((z, np.array([10, 20, 30]).view([('C', int)])))
551 #control = np.array([('A', 1., 10), ('B', 2., 20), ('-1', -1, 20)],
552 # dtype=[('A', '|S3'), ('B', float), ('C', int)])
553 #assert_equal(test, control)
554
555 # Hack to avoid pyflakes warnings about unused variables
556 merge_arrays((z, np.array([10, 20, 30]).view([('C', int)])))
557 np.array([('A', 1., 10), ('B', 2., 20), ('-1', -1, 20)],
558 dtype=[('A', '|S3'), ('B', float), ('C', int)])
559
560 def test_singlerecord(self):
561 (_, x, y, z) = self.data

Callers

nothing calls this directly

Calls 2

merge_arraysFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected