AlenkaF commented on code in PR #41593:
URL: https://github.com/apache/arrow/pull/41593#discussion_r1776671945


##########
docs/source/format/images/bool-diagram.svg:
##########


Review Comment:
   Ha, checking the example with nanoarrow or numpy shows I was wrong:
   
   ```python
   >>> column_bool = pa.array([True, True, False, None, False, True], 
type=pa.bool_())
   >>> column_bool
   <pyarrow.lib.BooleanArray object at 0x7c13f973f580>
   [
     true,
     true,
     false,
     null,
     false,
     true
   ]
   
   >>> na.array(column_bool).inspect()
   <ArrowArray bool>
   - length: 6
   - offset: 0
   - null_count: 1
   - buffers[2]:
     - validity <bool[1 b] 11101100>
     - data <bool[1 b] 11000100>
   - dictionary: NULL
   - children[0]:
   
   >>> np.unpackbits(np.frombuffer(column_bool.buffers()[1], dtype="uint8"), 
bitorder="little")
   array([1, 1, 0, 0, 0, 1, 0, 0], dtype=uint8)
   ```
   
   Will correct values bitmap buffer to `1 1 0 0 0 1 0 0`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to