create_nd
- static TensorInfo.create_nd(shape: ~typing.List[int], dtype: ~typing.Union[~tcim_lite.pytcim.DataType, type] = <class 'numpy.uint8'>, stride: ~typing.List[int] = [])
Creates a
TensorInfoobject for a non-image (ND) tensor with the specified shape, data type, and stride.- Parameters:
shape (List[int]) -- A list specifying the size of each dimension of the tensor.
dtype (Union[DataType, type], optional) -- The data type of the tensor. Defaults to
np.uint8. If a Python type, such asnp.float32is provided, it will be mapped to the corresponding internal DataType usingTensorInfo.numpy_tcim_map. SeeTensorInfofor details.stride (List[int], optional) -- The list specifying the stride for each dimension. The stride defines the memory layout and the number of bytes to move between adjacent elements along each dimension. Defaults to an empty list, indicating a contiguous memory layout.
- Returns:
tensor_info -- An object representing information about a multi-dimensional non-image tensor.
- Return type:
- Raises:
RuntimeError -- If the provided
dtypeis not supported or if the tensor creation fails.