Expand description
Conversion between nd columns and the Arrow canonical tensor types
arrow.fixed_shape_tensor and arrow.variable_shape_tensor.
The canonical types keep the dimension names in the field metadata, so all rows of a column must share their names and rank. They have no attributes, and their elements cannot be null: fill nulls before a conversion.
The canonical dim_names and shape describe the physical row-major
layout, which is the nd layout. A permutation is only a view hint, so a
conversion from a tensor ignores it.
This module writes and reads the metadata JSON itself, by the Arrow
specification. It reads both permutation and permutations keys.
Constants§
- FIXED_
SHAPE_ TENSOR - Extension name of the Arrow canonical fixed shape tensor.
- VARIABLE_
SHAPE_ TENSOR - Extension name of the Arrow canonical variable shape tensor.
Functions§
- column_
from_ field - Read a column that is an nd column or a canonical tensor column, by the
extension name on
field. - to_
fixed_ shape_ tensor - Convert to an
arrow.fixed_shape_tensorfield namednameand its storage. All non-null rows need the same dimensions. - to_
variable_ shape_ tensor - Convert to an
arrow.variable_shape_tensorfield namednameand its storage. The values are not copied.