Skip to content
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

Backport PR #5052 on branch yt-4.4.x (BUG: fix load_uniform_grid with cell_widths and multiple fields) #5056

Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion yt/frontends/stream/tests/test_stream_stretched.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def test_variable_dx():
def data_cell_widths_N16():
np.random.seed(0x4D3D3D3)
N = 16
data = {"density": np.random.random((N, N, N))}
data = {
"density": np.random.random((N, N, N)),
"temperature": np.random.random((N, N, N)),
}

cell_widths = []
for _ in range(3):
Expand Down
2 changes: 1 addition & 1 deletion yt/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ def load_uniform_grid(
bbox,
cell_widths=cell_widths,
)
cell_widths = grid_cell_widths
grid_dimensions = np.array(list(shapes), dtype="int32")
temp[key] = [data[key][slice] for slice in slices]
cell_widths = grid_cell_widths

for gid in range(nprocs):
new_data[gid] = {}
Expand Down
Loading