pyarray¶
-
template <class T>
classpyarray: public xt::pycontainer<pyarray<T>>, public xcontainer_semantic<pyarray<T>>¶ Multidimensional container providing the xtensor container semantics to a numpy array.
pyarray is similar to the xarray container in that it has a dynamic dimensionality. Reshapes of a pyarray container are reflected in the underlying numpy array.
- See
- pytensor
- Template Parameters
T: The type of the element stored in the pyarray.
Constructors
-
pyarray(const value_type &t)¶ Allocates a pyarray with nested initializer lists.
-
pyarray(const shape_type &shape, layout_type l = layout_type::row_major)¶ Allocates an uninitialized pyarray with the specified shape and layout.
- Parameters
shape: the shape of the pyarrayl: the layout of the pyarray
-
pyarray(const shape_type &shape, const_reference value, layout_type l = layout_type::row_major)¶ Allocates a pyarray with the specified shape and layout.
Elements are initialized to the specified value.
- Parameters
shape: the shape of the pyarrayvalue: the value of the elementsl: the layout of the pyarray
-
pyarray(const shape_type &shape, const strides_type &strides, const_reference value)¶ Allocates an uninitialized pyarray with the specified shape and strides.
Elements are initialized to the specified value.
- Parameters
shape: the shape of the pyarraystrides: the strides of the pyarrayvalue: the value of the elements
-
pyarray(const shape_type &shape, const strides_type &strides)¶ Allocates an uninitialized pyarray with the specified shape and strides.
- Parameters
shape: the shape of the pyarraystrides: the strides of the pyarray