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

Method test_where_broadcast

numpy/ma/tests/test_core.py:4583–4591  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4581 assert_equal(test, control)
4582
4583 def test_where_broadcast(self):
4584 # Issue 8599
4585 x = np.arange(9).reshape(3, 3)
4586 y = np.zeros(3)
4587 core = np.where([1, 0, 1], x, y)
4588 ma = where([1, 0, 1], x, y)
4589
4590 assert_equal(core, ma)
4591 assert_equal(core.dtype, ma.dtype)
4592
4593 def test_where_structured(self):
4594 # Issue 8600

Callers

nothing calls this directly

Calls 3

whereFunction · 0.90
assert_equalFunction · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected