49 template<
typename dtype>
55 const auto numRows =
static_cast<int32>(inShape.
rows);
56 const auto numCols =
static_cast<int32>(inShape.
cols);
60 inArray(inBorderWidth, inBorderWidth));
63 inArray.
put(
Slice(0, inBorderWidth),
Slice(numCols - inBorderWidth, numCols),
64 inArray(inBorderWidth, numCols - inBorderWidth - 1));
67 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(0, inBorderWidth),
68 inArray(numRows - inBorderWidth - 1, inBorderWidth));
71 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(numCols - inBorderWidth, numCols),
72 inArray(numRows - inBorderWidth - 1, numCols - inBorderWidth - 1));
83 template<
typename dtype>
89 const auto numRows =
static_cast<int32>(inShape.
rows);
90 const auto numCols =
static_cast<int32>(inShape.
cols);
93 inArray.
put(
Slice(0, inBorderWidth),
Slice(0, inBorderWidth), inFillValue);
96 inArray.
put(
Slice(0, inBorderWidth),
Slice(numCols - inBorderWidth, numCols), inFillValue);
99 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(0, inBorderWidth), inFillValue);
102 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(numCols - inBorderWidth, numCols), inFillValue);
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:37
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:3666
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4283
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
void fillCorners(NdArray< dtype > &inArray, uint32 inBorderWidth)
Definition: fillCorners.hpp:50
Definition: Coordinate.hpp:45
std::int32_t int32
Definition: Types.hpp:36
std::uint32_t uint32
Definition: Types.hpp:40