49 template<
typename dtype>
55 Shape outShape(inShape);
56 outShape.
rows += 2 * inPadWidth;
57 outShape.
cols += 2 * inPadWidth;
60 returnArray.
fill(inPadValue);
61 returnArray.
put(
Slice(inPadWidth, inPadWidth + inShape.
rows),
Slice(inPadWidth, inPadWidth + inShape.
cols), inArray);
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:50
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
NdArray< dtype > & put(int32 inIndex, value_type inValue)
Definition: NdArrayCore.hpp:3856
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4483
NdArray< dtype > & fill(value_type inFillValue) noexcept
Definition: NdArrayCore.hpp:2878
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:44
Definition: Coordinate.hpp:45
NdArray< dtype > pad(const NdArray< dtype > &inArray, uint16 inPadWidth, dtype inPadValue)
Definition: pad.hpp:50
std::uint16_t uint16
Definition: Types.hpp:41