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

Method test_record_array

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

Source from the content-addressed store, hash-verified

5012 'uint', 1024, -120, 100, inplace=inplace, expected_min=0)
5013
5014 def test_record_array(self):
5015 rec = np.array([(-5, 2.0, 3.0), (5.0, 4.0, 3.0)],
5016 dtype=[('x', '<f8'), ('y', '<f8'), ('z', '<f8')])
5017 y = rec['x'].clip(-0.3, 0.5)
5018 self._check_range(y, -0.3, 0.5)
5019
5020 def test_max_or_min(self):
5021 val = np.array([0, 1, 2, 3, 4, 5, 6, 7])

Callers

nothing calls this directly

Calls 2

_check_rangeMethod · 0.95
clipMethod · 0.80

Tested by

no test coverage detected