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

Rename DatasetArray to DataArray? #85

Closed
shoyer opened this issue Mar 27, 2014 · 3 comments
Closed

Rename DatasetArray to DataArray? #85

shoyer opened this issue Mar 27, 2014 · 3 comments

Comments

@shoyer
Copy link
Member

shoyer commented Mar 27, 2014

This would make it less ambiguous that this is the preferred way to access and manipulate data in xray.

On a related note, I would like to make XArray more of an internal implementation detail that we only expose to advanced users.

@akleeman
Copy link
Contributor

+1 I like the name DataArray much more than DatasetArray

@shoyer
Copy link
Member Author

shoyer commented Mar 27, 2014

For reference, I got the name "DataArray" from this Wes McKinney blog post:
http://wesmckinney.com/blog/?p=77

I will add a pull-request with this name change, perhaps along with the focus -> name change. For now, it will include DatasetArray = DataArray to make the change backwards compatible.

It would also be nice to be create to a DataArray (including both dimensions and coordinate values) from scratch without making a Dataset first. Ideally, we could just write

DataArray(data, x=np.arange(5), y=np.arange(10))

but unfortunately Python doesn't support inferring the order of keyword arguments.

Some options (not necessarily mutually exclusive), in descending (ascending) order of their machine (human) friendliness:

DataArray(data, [('x', np.arange(5)), ('y', np.arange(10))])
DataArray(data, ['x', 'y'], [np.arange(5), np.arange(10)])
DataArray(data, 'x', np.arange(5), 'y', np.arange(10))

shoyer added a commit that referenced this issue Mar 28, 2014
Per discussion in issue #85.
shoyer added a commit that referenced this issue Mar 28, 2014
Per discussion in issue #85.
@shoyer
Copy link
Member Author

shoyer commented Mar 31, 2014

Fixed by #73.

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

2 participants