 |
NumCpp
1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
62 template<
typename dtype>
75 return identity<double>(inShape.
rows);
77 else if (inPower == 1)
79 return inArray.template astype<double>();
81 else if (inPower == -1)
89 for (
int16 i = 2; i < inPower; ++i)
91 returnArray =
dot(returnArray, inArrayDouble);
100 for (
int16 i = 2; i < inPower; ++i)
102 returnArray =
dot(returnArray, inverse);
NdArray< double > inv(const NdArray< dtype > &inArray)
Definition: inv.hpp:55
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4296
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:51
NdArray< dtype > dot(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition: dot.hpp:48
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 cols
Definition: Core/Shape.hpp:46
std::int16_t int16
Definition: Types.hpp:38
Definition: Coordinate.hpp:45
NdArray< double > matrix_power(const NdArray< dtype > &inArray, int16 inPower)
Definition: matrix_power.hpp:63
uint32 rows
Definition: Core/Shape.hpp:45
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37