MLXBackend.extract_center#

MLXBackend.extract_center(arr, newshape)[source]#

Extract the centered portion of an array based on a new shape.

Parameters:
arrNDArray

Input array.

newshapetuple

Desired shape for the central portion.

Returns:
NDArray

Central portion of the array with shape newshape.

References