Skip to content

Commit

Permalink
COMP: Only use np.float128 when available
Browse files Browse the repository at this point in the history
Not available on ARMv8.
  • Loading branch information
thewtex committed Apr 26, 2021
1 parent c863c48 commit 1237a57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Wrapping/Generators/Python/itk/support/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def initialize_c_types_once() -> (
else:
_UL: "itkCType" = itkCType("unsigned long", "UL", np.uint64)
_SL: "itkCType" = itkCType("signed long", "SL", np.int64)
_LD: "itkCType" = itkCType("long double", "LD", np.float128)
if hasattr(np, 'float128'):
_LD: "itkCType" = itkCType("long double", "LD", np.float128)
else:
_LD: "itkCType" = itkCType("long double", "LD")
_ULL: "itkCType" = itkCType("unsigned long long", "ULL", np.uint64)
_SC: "itkCType" = itkCType("signed char", "SC", np.int8)
_SS: "itkCType" = itkCType("signed short", "SS", np.int16)
Expand Down

0 comments on commit 1237a57

Please sign in to comment.