Tensor Back End.Copy To<T> Method
Copies the elements of one tensor to another, or to a new tensor.
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
A tensor of the same shape as source whose elements are equal to the corresponding elements of source.
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
public abstract Tensor<T> CopyTo<T>(
Tensor<T> source,
Tensor<T> destination,
Tensor<bool>? mask = null,
TensorElementOrder order = TensorElementOrder.Automatic
)
Parameters
- source Tensor<T>
- A tensor.
- destination Tensor<T>
- Optional. The tensor that is to hold the result. May be null.
- mask Tensor<Boolean> (Optional)
- Optional. A boolean tensor that specifies for which elements should be included in the operation. If null (the default), the operation is applied everywhere.
- order TensorElementOrder (Optional)
- Optional. If destination is null, the desired ordering in memory of the result.
Type Parameters
- T
- The type of the elements of the tensor.
Return Value
Tensor<T>A tensor of the same shape as source whose elements are equal to the corresponding elements of source.
Exceptions
Argument | source is null. |
Dimension | source and mask are not jointly broadcastable to destination. |