Template Function parrot::matrix(T, std::initializer_list<int>)#
Defined in File parrot.hpp
Function Documentation#
-
template<typename T>
auto parrot::matrix(T value, std::initializer_list<int> shape)# Create a multi-dimensional array filled with a constant value.
- Template Parameters:
T – The element type (automatically deduced)
- Parameters:
value – The constant value to fill the matrix with
shape – The shape as an initializer list {rows, cols}
- Throws:
std::invalid_argument – if shape doesn’t have exactly 2 dimensions
- Returns:
A fusion_array with the specified shape filled with the constant value