MCPcopy
hub / github.com/numpy/numpy / test_outer_subclass_preserve

Function test_outer_subclass_preserve

numpy/_core/tests/test_umath.py:5078–5083  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

5076 np.matrix([[0, 1], [2, 5]]),
5077 ])
5078def test_outer_subclass_preserve(arr):
5079 # for gh-8661
5080 class foo(np.ndarray):
5081 pass
5082 actual = np.multiply.outer(arr.view(foo), arr.view(foo))
5083 assert actual.__class__.__name__ == 'foo'
5084
5085def test_outer_bad_subclass():
5086 class BadArr1(np.ndarray):

Callers

nothing calls this directly

Calls 2

outerMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…