JaxBackend.topleft_pad#

JaxBackend.topleft_pad(arr, shape, padval=0)[source]#

Returns an array that has been padded to a specified shape with a padding value at the top-left corner.

Parameters:
arrBackendArray

Input array to be padded.

shapeTuple[int]

Desired shape for the output array.

padvalint, optional

Value to use for padding, default is 0.

Returns:
BackendArray

Array that has been padded to the specified shape.