DeepLearning/Tensor/Cast - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Operations on Tensors : DeepLearning/Tensor/Cast

DeepLearning/Tensor/Cast

cast Tensor to new type

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Cast(x, t)

Parameters

x

-

Tensor

t

-

one of string,truefalse,integer[4],integer[8],float[4],float[8],complex[4], or complex[8]

Description

• 

The Cast(x,t) command constructs a Tensor by casting x to the specified type t.

Examples

withDeepLearning:

t1Constant86,15,77,19,89,80,53,66,19,datatype=float4

t1DeepLearning TensorName: Const:0Shape: [3, 3]Data Type: float[4]

(1)

t2Castt1,complex8

t2DeepLearning TensorName: Cast:0Shape: [3, 3]Data Type: complex[8]

(2)

valuet2

86.+0.I−15.+0.I77.+0.I−19.+0.I−89.+0.I−80.+0.I−53.+0.I66.+0.I−19.+0.I

(3)

Compatibility

• 

The DeepLearning/Tensor/Cast command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning Overview

Tensor