49 template<
typename dtype>
55 const auto numRows =
static_cast<int32>(inShape.
rows);
56 const auto numCols =
static_cast<int32>(inShape.
cols);
59 inArray.
put(
Slice(0, inBorderWidth),
Slice(0, inBorderWidth), inArray(inBorderWidth, inBorderWidth));
63 Slice(numCols - inBorderWidth, numCols),
64 inArray(inBorderWidth, numCols - inBorderWidth - 1));
67 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
68 Slice(0, inBorderWidth),
69 inArray(numRows - inBorderWidth - 1, inBorderWidth));
72 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
73 Slice(numCols - inBorderWidth, numCols),
74 inArray(numRows - inBorderWidth - 1, numCols - inBorderWidth - 1));
85 template<
typename dtype>
91 const auto numRows =
static_cast<int32>(inShape.
rows);
92 const auto numCols =
static_cast<int32>(inShape.
cols);
95 inArray.
put(
Slice(0, inBorderWidth),
Slice(0, inBorderWidth), inFillValue);
98 inArray.
put(
Slice(0, inBorderWidth),
Slice(numCols - inBorderWidth, numCols), inFillValue);
101 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
Slice(0, inBorderWidth), inFillValue);
104 inArray.
put(
Slice(numRows - inBorderWidth, numRows),
105 Slice(numCols - inBorderWidth, numCols),
#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:3479
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4092
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