48 template<
typename dtype>
54 Shape outShape(inShape);
55 outShape.
rows += 2 * inPadWidth;
56 outShape.
cols += 2 * inPadWidth;
59 returnArray.
fill(inPadValue);
60 returnArray.
put(
Slice(inPadWidth, inPadWidth + inShape.
rows),
61 Slice(inPadWidth, inPadWidth + inShape.
cols),
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:56
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
self_type & fill(value_type inFillValue) noexcept
Definition: NdArrayCore.hpp:2808
self_type & put(index_type inIndex, const value_type &inValue)
Definition: NdArrayCore.hpp:3693
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
A Class for slicing into NdArrays.
Definition: Slice.hpp:45
Definition: Cartesian.hpp:40
std::uint16_t uint16
Definition: Types.hpp:41
NdArray< dtype > pad(const NdArray< dtype > &inArray, uint16 inPadWidth, dtype inPadValue)
Definition: pad.hpp:49