Would this really be practicality beating purity?
It would be nice to have know the principle governing this.
For example, is there a way to convincingly group these as
array operations vs matrix operations?

Personally I am puzzled by preserving subtype of `diagonal` and
very especially of `ravel`.  Has anyone requested this?
(I can see the argument for `diag`.)

Alan Isaac

On 1/2/2015 9:04 PM, Charles R Harris wrote:
> The diag, diagonal, and ravel functions have recently been changed to 
> preserve subtypes. However, this causes lots of backward compatibility 
> problems
> for matrix users, in particular, scipy.sparse. One possibility for fixing 
> this is to special case matrix and so that these functions continue to
> return 1-d arrays for matrix instances. This is kind of ugly as `a..ravel` 
> will still return a matrix when a is a matrix, an ugly inconsistency. This
> may be a case where  practicality beats beauty.

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to