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

Method test_constant_both

numpy/f2py/tests/test_parameter.py:82–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80
81 @pytest.mark.slow
82 def test_constant_both(self):
83 # non-contiguous should raise error
84 x = np.arange(6, dtype=np.float64)[::2]
85 pytest.raises(ValueError, self.module.foo, x)
86
87 # check values with contiguous array
88 x = np.arange(3, dtype=np.float64)
89 self.module.foo(x)
90 assert np.allclose(x, [0 + 1 * 3 * 3 + 2 * 3 * 3, 1 * 3, 2 * 3])
91
92 @pytest.mark.slow
93 def test_constant_no(self):

Callers

nothing calls this directly

Calls 1

fooMethod · 0.45

Tested by

no test coverage detected