Contents

init(converting:)

Initialize by converting a MLMultiArray of different scalar type.

Declaration

init(converting multiArray: MLMultiArray)

Parameters

  • multiArray:

    MLMultiArray object

Discussion

Converting a floating number to an integer uses rounding-towards-zero method.

When necessary, the source values are truncated to fit the destination type, but the behavior is undefined if the source value is too large, too small, or otherwise not representable in the destination type.

See Also

Creating a shaped array type from another type