kylebarron opened a new issue, #34316:
URL: https://github.com/apache/arrow/issues/34316

   ### Describe the enhancement requested
   
   In 
[`ListArray.from_arrays`](https://arrow.apache.org/docs/python/generated/pyarrow.ListArray.html#pyarrow.ListArray.from_arrays)
 it's possible to pass in a mask array defining which list elements are null. 
[`FixedSizeListArray.from_arrays`](https://arrow.apache.org/docs/python/generated/pyarrow.FixedSizeListArray.html#pyarrow.FixedSizeListArray.from_arrays)
 does not currently have a `mask` parameter, so it appears impossible to create 
a fixed size list array where some elements are null?
   
   ```py
   pa.array([1, 2, 3, 4], mask=[False, True, False, False])
   # <pyarrow.lib.Int64Array object at 0x126eb29e0>
   # [
   #   1,
   #   null,
   #   3,
   #   4
   # ]
   pa.FixedSizeListArray.from_arrays([1, 2, 3, 4], 2)
   # <pyarrow.lib.FixedSizeListArray object at 0x127255900>
   # [
   #   [
   #     1,
   #     2
   #   ],
   #   [
   #     3,
   #     4
   #   ]
   # ]
   pa.FixedSizeListArray.from_arrays([1, 2, 3, 4], 2, mask=[False, True])
   # TypeError                                 Traceback (most recent call last)
   # /Users/kyle/fused/application/job/job/raster/naip/async_zonal_stats.py in 
line 1
   # ----> 449 pa.FixedSizeListArray.from_arrays([1, 2, 3, 4], 2, mask=[False, 
True])
   #
   # File 
~/fused/application/job/.venv/lib/python3.11/site-packages/pyarrow/array.pxi:2141,
 in pyarrow.lib.FixedSizeListArray.from_arrays()
   #
   # TypeError: from_arrays() got an unexpected keyword argument 'mask'
   ```
   
   ### Component(s)
   
   Python


-- 
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