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

Method test_various_alignments

numpy/core/tests/test_multiarray.py:9818–9827  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9816 raise ValueError()
9817
9818 def test_various_alignments(self):
9819 for align in [1, 2, 3, 4, 8, 12, 16, 32, 64, None]:
9820 for n in [0, 1, 3, 11]:
9821 for order in ["C", "F", None]:
9822 for dtype in list(np.typecodes["All"]) + ['i4,i4,i4']:
9823 if dtype == 'O':
9824 # object dtype can't be misaligned
9825 continue
9826 for shape in [n, (1, 2, 3, n)]:
9827 self.check(shape, np.dtype(dtype), order, align)
9828
9829 def test_strided_loop_alignments(self):
9830 # particularly test that complex64 and float128 use right alignment

Callers

nothing calls this directly

Calls 2

checkMethod · 0.95
dtypeMethod · 0.45

Tested by

no test coverage detected