50 template<
typename dtype>
61 for (
uint32 row = inK; row < inN; ++row)
68 returnArray(row, col++) = dtype{ 1 };
74 for (
uint32 col = inK; col < inM; ++col)
81 returnArray(row++, col) = dtype{ 1 };
100 template<
typename dtype>
103 return eye<dtype>(inN, inN, inK);
118 template<
typename dtype>
121 return eye<dtype>(inShape.
rows, inShape.
cols, inK);
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:56
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
self_type & zeros() noexcept
Definition: NdArrayCore.hpp:4900
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: Cartesian.hpp:40
std::int32_t int32
Definition: Types.hpp:36
NdArray< dtype > eye(uint32 inN, uint32 inM, int32 inK=0)
Definition: eye.hpp:51
std::uint32_t uint32
Definition: Types.hpp:40