Skip to content

Commit

Permalink
BUG: itk.CType to numpy.dtype types for Windows
Browse files Browse the repository at this point in the history
numpy.float128 does not exist on Windows. Fix typos in numpy integer
type names.
  • Loading branch information
thewtex committed Apr 23, 2020
1 parent bf8eab5 commit 7cd5889
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Wrapping/Generators/Python/itkTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ def GetCType(name):
if HAVE_NUMPY:
F = itkCType("float", "F", np.float32)
D = itkCType("double", "D", np.float64)
LD = itkCType("long double", "LD", np.float128)
UC = itkCType("unsigned char", "UC", np.uint8)
US = itkCType("unsigned short", "US", np.uint16)
UI = itkCType("unsigned int", "UI", np.uint32)
if os.name == 'nt':
UL = itkCType("unsigned long", "UL", np.uintl32)
SL = itkCType("signed long", "SL", np.intl32)
UL = itkCType("unsigned long", "UL", np.uint32)
SL = itkCType("signed long", "SL", np.int32)
LD = itkCType("long double", "LD")
else:
UL = itkCType("unsigned long", "UL", np.uint64)
SL = itkCType("signed long", "SL", np.int64)
LD = itkCType("long double", "LD", np.float128)
ULL = itkCType("unsigned long long", "ULL", np.uint64)
SC = itkCType("signed char", "SC", np.int8)
SS = itkCType("signed short", "SS", np.int16)
Expand Down

0 comments on commit 7cd5889

Please sign in to comment.