Chances are this is a very stupid question but I spent a pretty absurd amount of time looking for it on the documentation, to no avail.
in MATLAB, the find() function gives me an array with the indices of nonzero elements. Numpy's np.nonzero function does something similar.
How do I do this in the C++ Eigen library? I have a Boolean array of
typedef <bool, 10, 1> foobar = MatrixA < MatrixB;
so far. Thanks!
find()
function' since you can easily write it yourself in C++ using loops or whatnot. If you did that in MATLAB or Numpy, there'd be a big performance penalty. – Stymie