 |
NumCpp
1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
50 template<
typename dtype>
56 Shape outShape(inShape);
57 outShape.
rows += 2 * inPadWidth;
58 outShape.
cols += 2 * inPadWidth;
61 returnArray.
fill(inPadValue);
62 returnArray.
put(
Slice(inPadWidth, inPadWidth + inShape.
rows),
Slice(inPadWidth, inPadWidth + inShape.
cols), inArray);
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4296
NdArray< dtype > pad(const NdArray< dtype > &inArray, uint16 inPadWidth, dtype inPadValue)
Definition: pad.hpp:51
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:51
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
NdArray< dtype > & put(int32 inIndex, value_type inValue)
Definition: NdArrayCore.hpp:3667
uint32 cols
Definition: Core/Shape.hpp:46
Definition: Coordinate.hpp:45
uint32 rows
Definition: Core/Shape.hpp:45
std::uint16_t uint16
Definition: Types.hpp:42
A Class for slicing into NdArrays.
Definition: Slice.hpp:44
NdArray< dtype > & fill(value_type inFillValue) noexcept
Definition: NdArrayCore.hpp:2727