pastebin

Paste Search Dynamic
Recent pastes
dtype to descr
  1. import numpy as np
  2. from numpy.lib.format import dtype_to_descr
  3.  
  4. print("bool:", dtype_to_descr(np.dtype(np.bool_)))
  5. print("signed char:", dtype_to_descr(np.dtype(np.byte)))
  6. print("unsigned char:", dtype_to_descr(np.dtype(np.ubyte)))
  7. print("short:", dtype_to_descr(np.dtype(np.short)))
  8. print("unsigned short:", dtype_to_descr(np.dtype(np.ushort)))
  9. print("int:", dtype_to_descr(np.dtype(np.intc)))
  10. print("unsigned int:", dtype_to_descr(np.dtype(np.uintc)))
  11. print("long:", dtype_to_descr(np.dtype(np.int_)))
  12. print("unsigned long:", dtype_to_descr(np.dtype(np.uint)))
  13. print("long long:", dtype_to_descr(np.dtype(np.longlong)))
  14. print("unsigned long long:", dtype_to_descr(np.dtype(np.ulonglong)))
  15. print("float:", dtype_to_descr(np.dtype(np.single)))
  16. print("double:", dtype_to_descr(np.dtype(np.double)))
  17. print("long double:", dtype_to_descr(np.dtype(np.longdouble)))
  18.  
  19. print("int8_t:", dtype_to_descr(np.dtype(np.int8)))
  20. print("uint8_t:", dtype_to_descr(np.dtype(np.uint8)))
  21. print("int16_t:", dtype_to_descr(np.dtype(np.int16)))
  22. print("uint16_t:", dtype_to_descr(np.dtype(np.uint16)))
  23. print("int32_t:", dtype_to_descr(np.dtype(np.int32)))
  24. print("uint32_t:", dtype_to_descr(np.dtype(np.uint32)))
  25. print("int64_t:", dtype_to_descr(np.dtype(np.int64)))
  26. print("uint64_t:", dtype_to_descr(np.dtype(np.uint64)))
  27. print("float32:", dtype_to_descr(np.dtype(np.float32)))
  28. print("float64:", dtype_to_descr(np.dtype(np.float64)))
  29. try:
  30.         print("float96:", dtype_to_descr(np.dtype(np.float96)))
  31. except:
  32.         print("float128:", dtype_to_descr(np.dtype(np.float128)))
  33.  
Parsed in 0.022 seconds