import numpy as np
__doc__ = u"""
+ >>> assert_dtype_sizes()
+
>>> basic()
[[0 1 2 3 4]
[5 6 7 8 9]]
__doc__ = u""
+def assert_dtype_sizes():
+ assert sizeof(np.int8_t) == 1
+ assert sizeof(np.int16_t) == 2
+ assert sizeof(np.int32_t) == 4
+ assert sizeof(np.int64_t) == 8
+ assert sizeof(np.uint8_t) == 1
+ assert sizeof(np.uint16_t) == 2
+ assert sizeof(np.uint32_t) == 4
+ assert sizeof(np.uint64_t) == 8
+ assert sizeof(np.float32_t) == 4
+ assert sizeof(np.float64_t) == 8
+ assert sizeof(np.complex64_t) == 8
+ assert sizeof(np.complex128_t) == 16
+
def ndarray_str(arr):
u"""
Since Py2.3 doctest don't support <BLANKLINE>, manually replace blank lines