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

Method test_inplace

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

Source from the content-addressed store, hash-verified

111 check(np.array(0) + ArrayLike(np.array(0)))
112
113 def test_inplace(self):
114 array_like = ArrayLike(np.array([0]))
115 array_like += 1
116 _assert_equal_type_and_value(array_like, ArrayLike(np.array([1])))
117
118 array = np.array([0])
119 array += ArrayLike(1)
120 _assert_equal_type_and_value(array, ArrayLike(np.array([1])))
121
122 def test_opt_out(self):
123

Callers

nothing calls this directly

Calls 2

ArrayLikeClass · 0.70

Tested by

no test coverage detected