-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python): Ensure that buffer produced by `CBufferView.unpack_bits…
…()` has a boolean type (#457) This is small change to ensure that `np.array(some_buffer.unpack_bits())` "just works" without nanoarrow having to know about numpy dtypes. Basically we just need to ensure that we can create/export a buffer with a `"?"` format string. ```python import nanoarrow as na import numpy as np bool_array = na.Array([True, True, True, False, False, True], na.bool_()) np.array(bool_array.buffer(1).unpack_bits(0, len(bool_array))) #> array([ True, True, True, False, False, True]) ```
- Loading branch information
1 parent
f47e830
commit 2f2450a
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters