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

Method _create_data

numpy/ma/tests/test_old_ma.py:847–867  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

845class TestArrayMethods:
846
847 def _create_data(self):
848 x = np.array([8.375, 7.545, 8.828, 8.5, 1.757, 5.928,
849 8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
850 3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
851 6.04, 9.63, 7.712, 3.382, 4.489, 6.479,
852 7.189, 9.645, 5.395, 4.961, 9.894, 2.893,
853 7.357, 9.828, 6.272, 3.758, 6.693, 0.993])
854 X = x.reshape(6, 6)
855 XX = x.reshape(3, 2, 2, 3)
856
857 m = np.array([0, 1, 0, 1, 0, 0,
858 1, 0, 1, 1, 0, 1,
859 0, 0, 0, 1, 0, 1,
860 0, 0, 0, 1, 1, 1,
861 1, 0, 0, 1, 0, 0,
862 0, 0, 1, 0, 1, 0])
863 mx = array(data=x, mask=m)
864 mX = array(data=X, mask=m.reshape(X.shape))
865 mXX = array(data=XX, mask=m.reshape(XX.shape))
866
867 return x, X, XX, m, mx, mX, mXX
868
869 def test_trace(self):
870 _, X, _, _, _, mX, _ = self._create_data()

Callers 7

test_traceMethod · 0.95
test_clipMethod · 0.95
test_ptpMethod · 0.95
test_swapaxesMethod · 0.95
test_cumprodMethod · 0.95
test_cumsumMethod · 0.95
test_varstdMethod · 0.95

Calls 2

arrayFunction · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected