Contents

reshape(withSourceArray:shape:)

Declaration

func reshape(withSourceArray sourceArray: MPSNDArray, shape: [NSNumber]) -> MPSNDArray?

Parameters

  • sourceArray:

    The source NDArray.

  • shape:

    The new shape in Tensorflow dimension order.

Return Value

A new array view of sourceArray is returned. Or nil If aliasing is not possible.

Discussion

Do a reshape operation on the CPU.