This is a pre-release version (2.5.0.dev0+git20251130.2de293a).Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / lib / _arraypad_impl / _pad_simple

function

numpy.lib._arraypad_impl:_pad_simple

source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_arraypad_impl.py:87

Signature

def _pad_simple(array, pad_width, fill_value = None)

Summary

Pad array on all sides with either a single value or undefined values.

Parameters

array : ndarray

Array to grow.

pad_width : sequence of tuple[int, int]

Pad width on both sides for each dimension in arr.

fill_value : scalar, optional

If provided the padded area is filled with this value, otherwise the pad area left undefined.

Returns

padded : ndarray

The padded array with the same dtype as`array`. Its order will default to C-style if array is not F-contiguous.

original_area_slice : tuple

A tuple of slices pointing to the area of the original array.

Aliases

  • numpy.lib._arraypad_impl._pad_simple