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

grid.collapse returns NaNs when granular temperature is initiated with grid containing values. #31

Open
dwerner95 opened this issue Mar 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dwerner95
Copy link
Member

Following code returns a field of NaNs

import up4
import numpy as np

data = up4.Data("test.hdf5")
grid = up4.Grid(data)
velfield = data.velocityfield(grid)

gran_temp_field = data.granular_temperature(field)
gran_temp_2d= gran_temp_field.collapse(0)

print(np.isnan(gran_temp_2d).all())

## returns True

While it is not the way the grid should be used, this bug should not happen.
gran_temp_field contains numbers that are not NaN, the grid.collapse() function should be able to produce a proper field. (slices work)

@dwerner95 dwerner95 added the bug Something isn't working label Mar 15, 2023
@DanW97
Copy link
Collaborator

DanW97 commented Mar 15, 2023

Aren't you meant to be on holiday?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants