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

Method test_array_like_add

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

Source from the content-addressed store, hash-verified

94class TestNDArrayOperatorsMixin:
95
96 def test_array_like_add(self):
97
98 def check(result):
99 _assert_equal_type_and_value(result, ArrayLike(0))
100
101 check(ArrayLike(0) + 0)
102 check(0 + ArrayLike(0))
103
104 check(ArrayLike(0) + np.array(0))
105 check(np.array(0) + ArrayLike(0))
106
107 check(ArrayLike(np.array(0)) + 0)
108 check(0 + ArrayLike(np.array(0)))
109
110 check(ArrayLike(np.array(0)) + np.array(0))
111 check(np.array(0) + ArrayLike(np.array(0)))
112
113 def test_inplace(self):
114 array_like = ArrayLike(np.array([0]))

Callers

nothing calls this directly

Calls 2

checkFunction · 0.85
ArrayLikeClass · 0.70

Tested by

no test coverage detected