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

Method _neg_byteorder

numpy/core/tests/test_numeric.py:1857–1863  ·  view source on GitHub ↗
(self, a)

Source from the content-addressed store, hash-verified

1855 return (randn(n, m)).astype(np.float32)
1856
1857 def _neg_byteorder(self, a):
1858 a = np.asarray(a)
1859 if sys.byteorder == 'little':
1860 a = a.astype(a.dtype.newbyteorder('>'))
1861 else:
1862 a = a.astype(a.dtype.newbyteorder('<'))
1863 return a
1864
1865 def _generate_non_native_data(self, n, m):
1866 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