This function doesn't currently test sparse matrices. The copy argument is otherwise tested above. Perhaps some of the the sparse and non-sparse testing can be refactored too...