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

Function test_bitwise_shift_error

numpy/array_api/tests/test_elementwise_functions.py:107–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107def test_bitwise_shift_error():
108 # bitwise shift functions should raise when the second argument is negative
109 assert_raises(
110 ValueError, lambda: bitwise_left_shift(asarray([1, 1]), asarray([1, -1]))
111 )
112 assert_raises(
113 ValueError, lambda: bitwise_right_shift(asarray([1, 1]), asarray([1, -1]))
114 )

Callers

nothing calls this directly

Calls 4

assert_raisesFunction · 0.90
bitwise_left_shiftFunction · 0.85
bitwise_right_shiftFunction · 0.85
asarrayFunction · 0.50

Tested by

no test coverage detected