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

Method test_unary_methods

numpy/lib/tests/test_mixins.py:170–177  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

168 x += obj
169
170 def test_unary_methods(self):
171 array = np.array([-1, 0, 1, 2])
172 array_like = ArrayLike(array)
173 for op in [operator.neg,
174 operator.pos,
175 abs,
176 operator.invert]:
177 _assert_equal_type_and_value(op(array_like), ArrayLike(op(array)))
178
179 def test_forward_binary_methods(self):
180 array = np.array([-1, 0, 1, 2])

Callers

nothing calls this directly

Calls 2

ArrayLikeClass · 0.70

Tested by

no test coverage detected