Use the ndarray::Array functions added in
DM-14728 instead of ndarray::Array::asEigen to eliminate our use of ndarray::EigenView in our C++ code.
Warning: these new functions return Eigen::Map, which does not use reference counting to manage memory, so be careful when converting old code. In most instances nothing needs to change as the Eigen object will to out of scope before the ndarray array. However, there are likely to be a few bits of code that will require non-trivial changes in order to avoid memory leaks (e.g. if the Eigen Map is passed around or stored); in that case we have to copy the array data or keep the data as an ndarray::Array and delay extracting the Eigen version until deeper in the code.
Note that updating our pybind11 wrappers will be done on a different ticket.