Function to_string(Matrix const&, unsigned int)

Function Documentation

inline std::string to_string(Matrix const &mat, unsigned int N_sub)

Converts the given (sub-)matrix into a python / numpy compatible string, e.g. you can copy this string directly into the interactive python console for debugging if necessary. If you want to print the entire matrix supply N_sub = N.

Parameters
  • &mat – The matrix which should ne converted to a string.

  • N_sub – The N_sub x N_sub matrix which should be printed. The caller has to make sure that N_sub <= N. If you want to print the entire matrix supply N_sub = N.

Returns A

string representation of the sub-matrix