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

Reuse same resampler for similar datasets #213

Merged
merged 5 commits into from Mar 13, 2018
Merged

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Mar 7, 2018

Provide better mechanism for using the same resampler over multiple datasets

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes git diff origin/develop **/*py | flake8 --diff
  • Fully documented

@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage increased (+0.9%) to 59.929% when pulling 852215e on bugfix-memory-leak into 9a40c87 on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 59.065% when pulling bb5f88b on bugfix-memory-leak into 9a40c87 on develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 59.065% when pulling bb5f88b on bugfix-memory-leak into 9a40c87 on develop.

@@ -54,7 +55,7 @@


def create_xarray(arr):
res = da.from_array(arr, chunks=(1000, 1000))
res = da.from_array(arr, chunks=(CHUNK_SIZE, CHUNK_SIZE))
res = xr.DataArray(res, dims=['y', 'x'],
coords=[np.arange(res.shape[0]),
np.arange(res.shape[1])])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't xarray create these coordinates on the fly if needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no unfortunately

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coordinates could be da.arange though, right? Plus since these are just aranges I don't think anything would use them. If you did operations with a non-coords array that had y/x dimensions and one that did I think it fills in the blanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@djhoese djhoese merged commit 4e9d486 into develop Mar 13, 2018
@djhoese djhoese deleted the bugfix-memory-leak branch March 13, 2018 19:36
@mraspaud mraspaud added enhancement code enhancements, features, improvements component:resampling labels Mar 20, 2018
@djhoese djhoese changed the title [WIP] Reuse same resampler for similar datasets Reuse same resampler for similar datasets Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:resampling enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants