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

Function test_outer_subclass_preserve

numpy/core/tests/test_umath.py:4667–4671  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

4665 np.matrix([[0, 1], [2, 5]]),
4666 ])
4667def test_outer_subclass_preserve(arr):
4668 # for gh-8661
4669 class foo(np.ndarray): pass
4670 actual = np.multiply.outer(arr.view(foo), arr.view(foo))
4671 assert actual.__class__.__name__ == 'foo'
4672
4673def test_outer_bad_subclass():
4674 class BadArr1(np.ndarray):

Callers

nothing calls this directly

Calls 2

outerMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected