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

Method test_ticket_1434

numpy/core/tests/test_regression.py:1550–1561  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1548 err_msg=name)
1549
1550 def test_ticket_1434(self):
1551 # Check that the out= argument in var and std has an effect
1552 data = np.array(((1, 2, 3), (4, 5, 6), (7, 8, 9)))
1553 out = np.zeros((3,))
1554
1555 ret = data.var(axis=1, out=out)
1556 assert_(ret is out)
1557 assert_array_equal(ret, data.var(axis=1))
1558
1559 ret = data.std(axis=1, out=out)
1560 assert_(ret is out)
1561 assert_array_equal(ret, data.std(axis=1))
1562
1563 def test_complex_nan_maximum(self):
1564 cnan = complex(0, np.nan)

Callers

nothing calls this directly

Calls 4

assert_Function · 0.90
assert_array_equalFunction · 0.90
varMethod · 0.45
stdMethod · 0.45

Tested by

no test coverage detected