Skip to content

Commit

Permalink
applied black
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelepapa committed Jun 27, 2024
1 parent 862a2ff commit c619eb7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions xdrt/xdr_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c619eb7

Please sign in to comment.