UnsqueezedTensorData

class UnsqueezedTensorData<T : DType, V>(base: TensorData<T, V>, dim: Int) : TensorData<T, V> (source)

A lightweight view over existing TensorData that inserts a size-1 dimension at dim. The underlying storage is shared; only the shape and index mapping change.

Constructors

Link copied to clipboard
constructor(base: TensorData<T, V>, dim: Int)

Properties

Link copied to clipboard
open override val shape: Shape

The shape descriptor that defines the dimensionality and size of this tensor data.

Functions

Link copied to clipboard
open operator override fun get(vararg indices: Int): V

Retrieves an element at the specified multidimensional indices.

Link copied to clipboard
open operator override fun set(vararg indices: Int, value: V)

Setter