PR re: issue 3167 to eradicate .todense()

As discussed in issue 3167 (https://github.com/scikit-learn/scikit-learn/issues/3167), replacing .todense() with .toarray().

Need to review in additional detail for any matrix-specific notation/operators/indexing, e.g., matrix mult or sums/means along axis.