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

Method _neg_byteorder

numpy/_core/tests/test_numeric.py:2346–2352  ·  view source on GitHub ↗
(self, a)

Source from the content-addressed store, hash-verified

2344 return (randn(n, m)).astype(np.float32)
2345
2346 def _neg_byteorder(self, a):
2347 a = np.asarray(a)
2348 if sys.byteorder == 'little':
2349 a = a.astype(a.dtype.newbyteorder('>'))
2350 else:
2351 a = a.astype(a.dtype.newbyteorder('<'))
2352 return a
2353
2354 def _generate_non_native_data(self, n, m):
2355 data = randn(n, m)

Callers 6

test_simple_nonnativeMethod · 0.95
test_type_cast_06Method · 0.95
test_type_cast_07Method · 0.95
test_type_cast_08Method · 0.95
test_type_cast_09Method · 0.95

Calls 1

astypeMethod · 0.80

Tested by

no test coverage detected