pyarrow.Tensor¶
- class pyarrow.Tensor¶
Bases:
pyarrow.lib._Weakrefable
A n-dimensional array a.k.a Tensor.
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)dim_name
(self, i)equals
(self, Tensor other)Return true if the tensors contains exactly equal data
from_numpy
(obj[, dim_names])Create a Tensor from a numpy array.
to_numpy
(self)Convert arrow::Tensor to numpy.ndarray with zero copy
Attributes
- dim_name(self, i)¶
- dim_names¶
- equals(self, Tensor other)¶
Return true if the tensors contains exactly equal data
- static from_numpy(obj, dim_names=None)¶
Create a Tensor from a numpy array.
- Parameters
- obj
numpy.ndarray
The source numpy array
- dim_names
list
, optional Names of each dimension of the Tensor.
- obj
- is_contiguous¶
- is_mutable¶
- ndim¶
- shape¶
- size¶
- strides¶
- to_numpy(self)¶
Convert arrow::Tensor to numpy.ndarray with zero copy
- type¶