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

Function _check_neg_zero

numpy/core/tests/test_ufunc.py:2806–2813  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2804
2805
2806def _check_neg_zero(value):
2807 if value != 0.0:
2808 return False
2809 if not np.signbit(value.real):
2810 return False
2811 if value.dtype.kind == "c":
2812 return np.signbit(value.imag)
2813 return True
2814
2815@pytest.mark.parametrize("dtype", np.typecodes["AllFloat"])
2816def test_addition_negative_zero(dtype):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected