Skip to content

Ensure VLen* encode methods return ndarrays #144

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 4 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Release notes
* Handle (new) buffer protocol conforming types in ``Pickle.decode``.
(by :user:`John Kirkham <jakirkham>`, :issue:`143`).

* Fix other ``VLen*`` encode() methods to return numpy arrays as well.
By :user:`John Kirkham <jakirkham>`, :issue:`144`.


.. _release_0.6.1:

Expand Down
50 changes: 42 additions & 8 deletions numcodecs/vlen.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions numcodecs/vlen.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class VLenBytes(Codec):
memcpy(data, encv, l)
data += l

return out
return ensure_ndarray(out)

@cython.wraparound(False)
@cython.boundscheck(False)
Expand Down Expand Up @@ -405,7 +405,7 @@ class VLenArray(Codec):
data += l
value_buffer.release()

return out
return ensure_ndarray(out)

@cython.wraparound(False)
@cython.boundscheck(False)
Expand Down