Skip to content

Allow DataArray objects without named dimensions? #116

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

Closed
shoyer opened this issue May 6, 2014 · 2 comments
Closed

Allow DataArray objects without named dimensions? #116

shoyer opened this issue May 6, 2014 · 2 comments

Comments

@shoyer
Copy link
Member

shoyer commented May 6, 2014

At PyData SV, @mrocklin suggested that by default, array broadcasting should fall back on numpy's shape based broadcasting. This would also simplify directly constructing DataArray objects (#115).

The trick will be to make this work with xray's internals, which currently assume that dimensions are always named by strings.

@shoyer
Copy link
Member Author

shoyer commented May 9, 2014

As I think more about this one, I'm questioning the value of allowing for unnamed dimensions, as opposed to simply defaulting to dimension names like "dim_0", "dim_1", etc.

In particular, unnamed dimensions are not very useful on object which use indices for alignment. To do sensible numpy like broadcasting, you need to be able to insert size 1 dimensions. But since we always have tick labels, we can't automatically expand those size 1 dimensions to the size of the dimension in the other array.

I suppose we could also make tick labels optional, which would make reshape operations or np.newaxis sensible. But I think I would rather still default to np.arange(size) like pandas.

@shoyer shoyer added the question label May 9, 2014
@shoyer shoyer changed the title Allow DataArray objects without named dimensions Allow DataArray objects without named dimensions? May 9, 2014
@shoyer shoyer added the wontfix label Jul 6, 2014
@shoyer
Copy link
Member Author

shoyer commented Jul 6, 2014

Closing this as "won't fix"

@shoyer shoyer closed this as completed Jul 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant