Share via


IReadOnlyTensor.IsDense Property

Definition

Determines if the current tensor is dense.

public:
 property bool IsDense { bool get(); };
public bool IsDense { get; }
member this.IsDense : bool
Public ReadOnly Property IsDense As Boolean

Property Value

Remarks

A dense tensor is one where the elements are ordered sequentially in memory and where no gaps exist between the elements.

For a 2x2 Tensor, this would mean it has FlattenedLength: 4; Lengths: [2, 2]; Strides: [2, 1]. The elements would be sequentially accessed via indexes: [0, 0]; [0, 1]; [1, 0]; [1, 1]

Applies to