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

Method _to_unsigned

numpy/core/tests/test_simd.py:94–103  ·  view source on GitHub ↗
(self, vector)

Source from the content-addressed store, hash-verified

92 return max_unsig[0]
93
94 def _to_unsigned(self, vector):
95 if isinstance(vector, (list, tuple)):
96 return getattr(self.npyv, "load_u" + self.sfx[1:])(vector)
97 else:
98 sfx = vector.__name__.replace("npyv_", "")
99 if sfx[0] == "b":
100 cvt_intrin = "cvt_u{0}_b{0}"
101 else:
102 cvt_intrin = "reinterpret_u{0}_{1}"
103 return getattr(self.npyv, cvt_intrin.format(sfx[1:], sfx))(vector)
104
105 def _pinfinity(self):
106 return float("inf")

Callers 3

_int_maxMethod · 0.95
test_roundingMethod · 0.80

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected