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

Method test_put_noncontiguous

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

Source from the content-addressed store, hash-verified

9316 assert_raises(ValueError, np.place, a, a>20, [])
9317
9318 def test_put_noncontiguous(self):
9319 a = np.arange(6).reshape(2,3).T # force non-c-contiguous
9320 np.put(a, [0, 2], [44, 55])
9321 assert_equal(a, np.array([[44, 3], [55, 4], [2, 5]]))
9322
9323 def test_putmask_noncontiguous(self):
9324 a = np.arange(6).reshape(2,3).T # force non-c-contiguous

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
reshapeMethod · 0.80
putMethod · 0.80

Tested by

no test coverage detected