Del via


Tensor.SqueezeDimension Method

Definition

Overloads

SqueezeDimension<T>(Tensor<T>, Int32)

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

SqueezeDimension<T>(ReadOnlyTensorSpan<T>, Int32)

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

SqueezeDimension<T>(TensorSpan<T>, Int32)

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

SqueezeDimension<T>(Tensor<T>, Int32)

Source:
TensorExtensions.cs

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::Tensor<T> ^ SqueezeDimension(System::Numerics::Tensors::Tensor<T> ^ tensor, int dimension);
public static System.Numerics.Tensors.Tensor<T> SqueezeDimension<T> (this System.Numerics.Tensors.Tensor<T> tensor, int dimension);
static member SqueezeDimension : System.Numerics.Tensors.Tensor<'T> * int -> System.Numerics.Tensors.Tensor<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (tensor As Tensor(Of T), dimension As Integer) As Tensor(Of T)

Type Parameters

T

Parameters

tensor
Tensor<T>

The Tensor<T> to remove dimension of length 1.

dimension
Int32

The dimension to remove.

Returns

Applies to

SqueezeDimension<T>(ReadOnlyTensorSpan<T>, Int32)

Source:
TensorExtensions.cs

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::ReadOnlyTensorSpan<T> SqueezeDimension(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, int dimension);
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> SqueezeDimension<T> (this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, int dimension);
static member SqueezeDimension : ReadOnlyTensorSpan * int -> System.Numerics.Tensors.ReadOnlyTensorSpan<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), dimension As Integer) As ReadOnlyTensorSpan(Of T)

Type Parameters

T

Parameters

tensor
ReadOnlyTensorSpan<T>

The ReadOnlyTensorSpan<T> to remove dimension of length 1.

dimension
Int32

The dimension to remove.

Returns

Applies to

SqueezeDimension<T>(TensorSpan<T>, Int32)

Source:
TensorExtensions.cs

Removes axis of length one from the tensor for the given dimension. If the dimension is not of length one it will throw an exception.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::TensorSpan<T> SqueezeDimension(System::Numerics::Tensors::TensorSpan<T> % tensor, int dimension);
public static System.Numerics.Tensors.TensorSpan<T> SqueezeDimension<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, int dimension);
static member SqueezeDimension : TensorSpan * int -> System.Numerics.Tensors.TensorSpan<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (ByRef tensor As TensorSpan(Of T), dimension As Integer) As TensorSpan(Of T)

Type Parameters

T

Parameters

tensor
TensorSpan<T>

The TensorSpan<T> to remove dimension of length 1.

dimension
Int32

The dimension to remove.

Returns

Applies to