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

Data.map_variable: fails with non-orthogonal axes #1102

Open
ddkohler opened this issue Sep 23, 2022 · 0 comments
Open

Data.map_variable: fails with non-orthogonal axes #1102

ddkohler opened this issue Sep 23, 2022 · 0 comments

Comments

@ddkohler
Copy link
Contributor

Though not specified, map_variable assumes the axes are orthogonal. There is a code block that spells this out:

for v in self.variables:
if wt_kit.orthogonal(v.shape, variable.shape):
out.create_variable(values=v[:], **v.attrs)
out.transform(*self.axis_expressions)

More thought is needed to determine if this requirement is necessary, or whether minor changes could relieve this requirement.

The first thing to do to approach this issue is properly document the scope of map_variable so that users have clear expectations for what to work with. We could also include some error handling to better inform the user on what goes wrong when data has the incompatible axes.

Secondly, we should consider if we can make map_variable more general wrt the axes it works with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant