-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix type instability #157
base: main
Are you sure you want to change the base?
Fix type instability #157
Conversation
dimensions_FT = map(dimensions, regridder.dim_increasing) do dim, increasing | ||
!increasing ? reverse(FT.(dim)) : FT.(dim) | ||
end | ||
dimensions_FT = ntuple( |
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.
Can you also add a check to check that the number of dimensions match between the given data and the space?
ext/InterpolationsRegridderExt.jl
Outdated
"""Tuple of integers indicating which dimensions to reverse in data""" | ||
decreasing_indices::DI | ||
|
||
"Number of dimensions" |
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.
What is this the number of dimensions for?
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 the number of dimensions of the space.
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.
Which space? The target space? And is it number of physical dimensions? Can we update the doc string to make this more clear?
2251e7d
to
bc7390b
Compare
This commit fixes the type instabilities in Regridders.regrid and DataHandling.regridded_snapshot.
This fixes the type instability of
DataHandling.regridded_snapshot
andRegridders.regrid
.