Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion yt/frontends/cholla/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def _parse_parameter_file(self):
attrs = h5f.attrs
self.parameters = dict(attrs.items())
self.domain_left_edge = attrs["bounds"][:].astype("=f8")
self.domain_right_edge = attrs["domain"][:].astype("=f8")
self.domain_right_edge = self.domain_left_edge + attrs["domain"][:].astype(
"=f8"
)
Comment on lines +106 to +108
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the rare cases where black makes things objectively worse looking... here's a possible alternative

Suggested change
self.domain_right_edge = self.domain_left_edge + attrs["domain"][:].astype(
"=f8"
)
dre = attrs["bounds"][:] + attrs["domain"][:]
self.domain_right_edge = dre.astype("=f8")

self.dimensionality = len(attrs["dims"][:])
self.domain_dimensions = attrs["dims"][:].astype("=f8")
self.current_time = attrs["t"][:]
Expand Down