51 template<
typename dtype>
62 for (
uint32 row = inK; row < inN; ++row)
69 returnArray(row, col++) = dtype{ 1 };
75 for (
uint32 col = inK; col < inM; ++col)
82 returnArray(row++, col) = dtype{ 1 };
102 template<
typename dtype>
105 return eye<dtype>(inN, inN, inK);
121 template<
typename dtype>
124 return eye<dtype>(inShape.
rows, inShape.
cols, inK);
#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 > & zeros() noexcept
Definition: NdArrayCore.hpp:4859
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
Definition: Coordinate.hpp:45
std::int32_t int32
Definition: Types.hpp:36
NdArray< dtype > eye(uint32 inN, uint32 inM, int32 inK=0)
Definition: eye.hpp:52
std::uint32_t uint32
Definition: Types.hpp:40