Tensor<T>.Copy Method

Returns a copy of the tensor.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
C#
public virtual Tensor<T> Copy(
	Tensor<bool>? mask = null,
	bool initializeToZero = true,
	TensorElementOrder order = TensorElementOrder.CStyle
)

Parameters

mask  Tensor<Boolean>  (Optional)
Optional. A boolean that specifies which elements should be copied. If null (the default), all elements are copied.
initializeToZero  Boolean  (Optional)
Specifies if the elements of the result tensor for which mask is false should be set to zero. The default is true.
order  TensorElementOrder  (Optional)
Optional. Specifies the element order of the result. By default, elements are stored in C-style (row-major) order.

Return Value

Tensor<T>
A copy of this tensor.

See Also