jax.lax.pad
jax.lax.pad#
- jax.lax.pad(operand, padding_value, padding_config)[source]#
Applies low, high, and/or interior padding to an array.
Wraps XLAβs Pad operator.
- Parameters
operand (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) β an array to be padded.padding_value (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) β the value to be inserted as padding. Must have the same dtype asoperand
.padding_config (
Sequence
[Tuple
[int
,int
,int
]]) β a sequence of(low, high, interior)
tuples of integers, giving the amount of low, high, and interior (dilation) padding to insert in each dimension.
- Return type
Array
- Returns
The
operand
array with padding valuepadding_value
inserted in each dimension according to thepadding_config
.