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

Avoid xarray len implementation loading data #1467

Merged
merged 1 commit into from May 22, 2017
Merged

Avoid xarray len implementation loading data #1467

merged 1 commit into from May 22, 2017

Conversation

@philippjfr
Copy link
Member

@philippjfr philippjfr commented May 21, 2017

XArray supports lazy loading of data but the current xarray interface uses the actual array data to determine the length of the data, which is highly inefficient. This PR instead uses the product of the coordinate array lengths which are always in memory to determine the overall length.

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented May 21, 2017

Makes sense, happy to merge when the tests go green.

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented May 22, 2017

Tests are green. Merging.

@jlstevens jlstevens merged commit 9388c12 into master May 22, 2017
4 checks passed
4 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+1.1%) to 78.832%
Details
@philippjfr
s3-reference-data-cache Test data is cached.
Details
@philippjfr philippjfr deleted the xarray_len branch May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants