cast
Converts variable to a different data type
📝Syntax
R = cast(V, type_destination)
R = cast(V, 'like', W)
📥Input Arguments
Parameter Description
V a variable
type_destination a string: name of destination data type.
W a variable
📤Output Arguments
Parameter Description
R a variable with new data type.
📄Description

cast converts variable to a different data type.

R = cast(V, 'like', W) converts varible V to sparsity and same data type than W.

💡Examples
r = cast([3.6 1.2 -2.4], 'like', int64(3))
r = cast([3.6 1.2 -2.4], 'int64')
🔗See Also
class
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub