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

Method test_basic

numpy/matrixlib/tests/test_defmatrix.py:313–318  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

311
312class TestIndexing:
313 def test_basic(self):
314 x = asmatrix(np.zeros((3, 2), float))
315 y = np.zeros((3, 1), float)
316 y[:, 0] = [0.8, 0.2, 0.3]
317 x[:, 1] = y > 0.5
318 assert_equal(x, [[0, 1], [0, 0], [0, 0]])
319
320
321class TestNewScalarIndexing:

Callers

nothing calls this directly

Calls 2

asmatrixFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected