-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PERF: Use grid tree for counting grid cell inclusion #4529
base: main
Are you sure you want to change the base?
Changes from all commits
8b3a320
8b2c75a
196a2a2
a93664a
45deabe
001c96e
827bb9e
61235df
8b49103
831d4a7
075db4b
bd55726
222764c
57ce059
041c9f5
218467f
150c84b
f89e48e
b3098bb
d4d7124
f961194
188390a
8ce607f
dd033e8
e28e4b1
9bd7462
301d272
f65df99
f390a2b
e061fa6
e987baf
fdca0de
1260e4a
189c39d
cb576e5
69a5f80
51cdcc9
86e32db
7544934
2a7cf8e
7dc292b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from yt.testing import ( | ||
fake_random_ds, | ||
requires_file, | ||
requires_module, | ||
) | ||
from yt.utilities.answer_testing.framework import data_dir_load | ||
|
||
g30 = "IsolatedGalaxy/galaxy0030/galaxy0030" | ||
|
||
|
||
@requires_module("h5py") | ||
@requires_file(g30) | ||
def test_checksum(): | ||
assert fake_random_ds(16).checksum == "notafile" | ||
assert data_dir_load(g30).checksum == "6169536e4b9f737ce3d3ad440df44c58" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,7 +243,11 @@ def _parse_parameter_file(self): | |
] | ||
else: | ||
self.data_software = "unknown" | ||
sp = self._handle["/simulation_parameters"].attrs | ||
# We have to turn everything that *is* a scalar into a scalar. | ||
sp = dict(self._handle["/simulation_parameters"].attrs) | ||
for k, v in sp.items(): | ||
if getattr(v, "size", None) == 1: | ||
sp[k] = v.item(0) | ||
Comment on lines
+248
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see a couple problems here
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the reason I'm using |
||
if self.geometry is None: | ||
geometry = just_one(sp.get("geometry", 0)) | ||
try: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the
base_type
argument necessary here ? or in other words, isAMRGridPatch
iterable ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed necessary, because
AMRGridPatch
exposes an iteration-like interface. This is a long-time issue, unfortunately.