Coverage for types.py: 67%

1"""

2 extended types

3

4>>> a = 5

5>>> isinstance(a, integer_types)

6 True

7>>> import numpy as np

8>>> a = np.int32(7)

9>>> isinstance(a, int)

10 False

11>>> isinstance(a, integer_types)

12 True

13"""

14

15 import numpy as np

16

17 integer_types = (int, np.int32, np.int64)

18 float_types = (float, np.float32, np.float64)

19

20 if __name__ == "__main__":

21 import doctest

22

23 doctest.testmod(optionflags=doctest.ELLIPSIS)