Constructor

ArrowTensornew

since: 0.3.0

Declaration [src]

GArrowTensor*
garrow_tensor_new (
  GArrowDataType* data_type,
  GArrowBuffer* data,
  gint64* shape,
  gsize n_dimensions,
  gint64* strides,
  gsize n_strides,
  gchar** dimension_names,
  gsize n_dimension_names
)

Description

No description available.

Available since: 0.3.0

Parameters

data_type

Type: GArrowDataType

A GArrowDataType that indicates each element type in the tensor.

The data is owned by the caller of the function.
data

Type: GArrowBuffer

A GArrowBuffer that contains tensor data.

The data is owned by the caller of the function.
shape

Type: An array of gint64

A list of dimension sizes.

The length of the array is specified in the n_dimensions argument.
The data is owned by the caller of the function.
n_dimensions

Type: gsize

The number of dimensions.

strides

Type: An array of gint64

A list of the number of bytes in each dimension.

The argument can be NULL.
The length of the array is specified in the n_strides argument.
The data is owned by the caller of the function.
n_strides

Type: gsize

The number of strides.

dimension_names

Type: An array of gchar*

A list of dimension names.

The argument can be NULL.
The length of the array is specified in the n_dimension_names argument.
The data is owned by the caller of the function.
Each element is a NUL terminated UTF-8 string.
n_dimension_names

Type: gsize

A list of dimension names.

Return value

Type: GArrowTensor

The newly created GArrowTensor.

The caller of the function takes ownership of the data, and is responsible for freeing it.