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

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I'm following from the official 
[docs](https://arrow.apache.org/docs/python/extending_types.html#fixed-size-tensor)
 on how to create a fixed size tensor and store it in a `pyarrow.Table`:
   
   ```python
   data = [
       pa.array([1, 2, 3]),
       pa.array(['foo', 'bar', None]),
       pa.array([True, None, True]),
       tensor_array,
       tensor_array_2
   ]
   my_schema = pa.schema([('f0', pa.int8()),
                          ('f1', pa.string()),
                          ('f2', pa.bool_()),
                          ('tensors_int', tensor_type),
                          ('tensors_float', tensor_type_2)])
   table = pa.Table.from_arrays(data, schema=my_schema)
   table
   ```
   
   While it's possible to do:
   
   ```python
   numpy_tensor = tensor_array_2.to_numpy_ndarray()
   ```
   
   I cannot achieve the same if I retrieve `tensor_array_2` from the table like 
this:
   
   ```python
   table.column("tensors_float").to_numpy_ndarray()
   ```
   
   I get the following error:
   
   ```
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
   AttributeError: 'pyarrow.lib.ChunkedArray' object has no attribute 
'to_numpy_ndarray'
   ```
   
   ### 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