From c619eb778b3d415a2b5faac3bb8c81316ed5350f Mon Sep 17 00:00:00 2001 From: Samuele Papa Date: Thu, 27 Jun 2024 11:37:41 +0200 Subject: [PATCH] applied black --- setup.py | 2 +- xdrt/xdr_reader.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 3a76352..74e8177 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def build_extension(self, ext): "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE", "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir), ] - if sys.maxsize > 2 ** 32: + if sys.maxsize > 2**32: cmake_args += ["-A", "x64"] build_args += ["--", "/m"] else: diff --git a/xdrt/xdr_reader.py b/xdrt/xdr_reader.py index 72b7d24..7bd472d 100644 --- a/xdrt/xdr_reader.py +++ b/xdrt/xdr_reader.py @@ -374,28 +374,24 @@ def read(xdr_filename, stop_before_data=False): header.grid_spacing = list(reversed(grid_spacing)) - else: # AVSField standard defines the min_ext and max_ext based on final bytes. for _ in range(header.ndim): header.min_ext.append(np.fromfile(file_handler, dtype=">f4", count=1)[0] * 10.0) # * 10. to convert to mm. header.max_ext.append(np.fromfile(file_handler, dtype=">f4", count=1)[0] * 10.0) # * 10. to convert to mm. - if not header.ndim == len(header.min_ext) == len(header.max_ext): raise IOError( f"Dimension {header.ndim} must match length of min_ext and max_ext." f" Got {header.ndim}, {header.min_ext} and {header.max_ext}" ) - if file_handler.tell() != path.getsize(xdr_filename): file_handler.close() raise IOError("Unexpected extra bytes.") file_handler.close() - shape = header.shape if header.veclen != 1: