constant_pad(x, pad_width, value=0, f=None)¶
Pads an array with a constant value.
x (array) – Input array to pad.
pad_width (sequence of tuples of ints) – Number of values padded to the edges of each axis. Specified as ((before_1, after_1), … (before_N, after_N)), where N is number of axes of x.
value (float or int, default zero) – The constant value to pad the array with.
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.
Padded array of rank equal to x with shape increased according to pad_width.