From 1237a57a3d2720708e4c6698f4e7dc465ec6c122 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sat, 24 Apr 2021 20:44:16 -0400 Subject: [PATCH] COMP: Only use np.float128 when available Not available on ARMv8. --- Wrapping/Generators/Python/itk/support/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Wrapping/Generators/Python/itk/support/types.py b/Wrapping/Generators/Python/itk/support/types.py index aa1d01b5337..75f6cdaf913 100644 --- a/Wrapping/Generators/Python/itk/support/types.py +++ b/Wrapping/Generators/Python/itk/support/types.py @@ -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)