MCPcopy Index your code
hub / github.com/numpy/numpy / _integer_repr

Function _integer_repr

numpy/testing/_private/utils.py:1961–1972  ·  view source on GitHub ↗
(x, vdt, comp)

Source from the content-addressed store, hash-verified

1959
1960
1961def _integer_repr(x, vdt, comp):
1962 # Reinterpret binary representation of the float as sign-magnitude:
1963 # take into account two-complement representation
1964 # See also
1965 # https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
1966 rx = x.view(vdt)
1967 if not (rx.size == 1):
1968 rx[rx < 0] = comp - rx[rx < 0]
1969 elif rx < 0:
1970 rx = comp - rx
1971
1972 return rx
1973
1974
1975def integer_repr(x):

Callers 1

integer_reprFunction · 0.85

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…