Cast - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


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

> 

with⁡DeepLearning:

> 

t1≔Constant⁡86,−15,77,−19,−89,−80,−53,66,−19,datatype=float4

t1≔DeepLearning TensorShape: [3, 3]Data Type: float[4]

(1)
> 

Cast⁡t1,complex8

DeepLearning TensorShape: [3, 3]Data Type: complex[8]

(2)

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