45 template<
typename dtype>
51 const auto numRows =
static_cast<int32>(inShape.
rows);
52 const auto numCols =
static_cast<int32>(inShape.
cols);
55 inArray.
put(
Slice(0, inBorderWidth),
Slice(0, inBorderWidth), inArray(inBorderWidth, inBorderWidth));
59 Slice(numCols - inBorderWidth, numCols),
60 inArray(inBorderWidth, numCols - inBorderWidth - 1));
63 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
64 Slice(0, inBorderWidth),
65 inArray(numRows - inBorderWidth - 1, inBorderWidth));
68 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
69 Slice(numCols - inBorderWidth, numCols),
70 inArray(numRows - inBorderWidth - 1, numCols - inBorderWidth - 1));
81 template<
typename dtype>
87 const auto numRows =
static_cast<int32>(inShape.
rows);
88 const auto numCols =
static_cast<int32>(inShape.
cols);
91 inArray.
put(
Slice(0, inBorderWidth),
Slice(0, inBorderWidth), inFillValue);
94 inArray.
put(
Slice(0, inBorderWidth),
Slice(numCols - inBorderWidth, numCols), inFillValue);
97 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(0, inBorderWidth), inFillValue);
100 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(numCols - inBorderWidth, numCols), inFillValue);
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
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 & 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: addBoundary1d.hpp:44
void fillCorners(NdArray< dtype > &inArray, uint32 inBorderWidth)
Definition: fillCorners.hpp:46
std::int32_t int32
Definition: Types.hpp:36
std::uint32_t uint32
Definition: Types.hpp:40