Skip to content

Revert ndarray coercion of encode returned data #155

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

Merged
merged 5 commits into from
Dec 3, 2018
Merged

Revert ndarray coercion of encode returned data #155

merged 5 commits into from
Dec 3, 2018

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Dec 3, 2018

This reverts PR ( #136 ) and PR ( #144 ). Based on other discussions ( most notably issue zarr-developers/zarr-python#348 ), we have decided to revert this to avoid unnecessary copies at the Zarr level particularly when working with in-memory stores.

TODO:

  • Unit tests and/or doctests in docstrings
  • tox -e py37 passes locally
  • tox -e py27 passes locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • tox -e docs passes locally
  • AppVeyor and Travis CI passes
  • Test coverage to 100% (Coveralls passes)

Copy link
Member

@alimanfoo alimanfoo left a comment

Choose a reason for hiding this comment

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

LGTM, just had one small query regarding gzip under PY2.

In order to make the user experience more consistent across Python 2/3,
always return a `bytes` object from `GZip.encode`. This will add a copy
to Python 3 before returning the result, but it will be no more copies
than already occur on Python 2.
@jakirkham
Copy link
Member Author

Thanks for the feedback. Should be ready for another look when you have a chance.

@alimanfoo alimanfoo merged commit c301eff into zarr-developers:master Dec 3, 2018
@alimanfoo
Copy link
Member

All good, thanks @jakirkham.

@jakirkham jakirkham deleted the revert_ndarray_out_coercion branch December 3, 2018 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants