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

Method test_record_array

numpy/core/tests/test_multiarray.py:5181–5186  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5179 assert_array_equal(x.take([0, 2, 1]), [1, 3, 2])
5180
5181 def test_record_array(self):
5182 # Note mixed byteorder.
5183 rec = np.array([(-5, 2.0, 3.0), (5.0, 4.0, 3.0)],
5184 dtype=[('x', '<f8'), ('y', '>f8'), ('z', '<f8')])
5185 rec1 = rec.take([1])
5186 assert_(rec1['x'] == 5.0 and rec1['y'] == 4.0)
5187
5188 def test_out_overlap(self):
5189 # gh-6272 check overlap on out

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
takeMethod · 0.80

Tested by

no test coverage detected