LDA++
|
#include <NumpyFormat.hpp>
Public Member Functions | |
const bool | fortran_contiguous () const |
const Scalar * | data () const |
const std::vector< size_t > & | shape () const |
template<int Rows, int Cols, int Options> | |
operator Eigen::Matrix< Scalar, Rows, Cols, Options > () const | |
Friends | |
std::istream & | operator>> (std::istream &is, NumpyInput &data) |
NumpyInput allows the unserialization of a contiguous numpy array from a stream.
Example:
numpy_format::NumpyInput<float> ni; std::cin >> ni; MatrixXf x = ni;
|
inline |
This operator allows the implicit cast of a NumpyInput to a compatible Eigen matrix.
numpy_format::NumpyInput<float> ni; std::cin >> ni; MatrixXf x = ni; // this conversion is done with this operator
|
friend |
Parse the serialized numpy array into a NumpyInput from an input strem.
numpy_format::NumpyInput<float> ni; std::cin >> ni; // this operator here
Only version 1 of the numpy format is supported but that should not present any problems.