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

Method test_subclass

numpy/core/tests/test_function_base.py:109–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 assert_equal(logspace(a, b), logspace(1.0, 5.0))
108
109 def test_subclass(self):
110 a = array(1).view(PhysicalQuantity2)
111 b = array(7).view(PhysicalQuantity2)
112 ls = logspace(a, b)
113 assert type(ls) is PhysicalQuantity2
114 assert_equal(ls, logspace(1.0, 7.0))
115 ls = logspace(a, b, 1)
116 assert type(ls) is PhysicalQuantity2
117 assert_equal(ls, logspace(1.0, 7.0, 1))
118
119
120class TestGeomspace:

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
logspaceFunction · 0.90
assert_equalFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected