MCPcopy Index your code
hub / github.com/numpy/numpy / _create_data

Method _create_data

numpy/_core/tests/test_multiarray.py:6093–6098  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6091 """Test tofile, fromfile, tobytes, and fromstring"""
6092
6093 def _create_data(self):
6094 shape = (2, 4, 3)
6095 rand = np.random.random
6096 x = rand(shape) + rand(shape).astype(complex) * 1j
6097 x[0, :, 1] = [np.nan, np.inf, -np.inf, np.nan]
6098 return x
6099
6100 @pytest.fixture(params=["string", "path_obj"])
6101 def param_filename(self, request):

Calls 2

randFunction · 0.85
astypeMethod · 0.80

Tested by

no test coverage detected