[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Double-prec diag and permutation matrices fall back to spar
From: |
John W. Eaton |
Subject: |
Re: [PATCH] Double-prec diag and permutation matrices fall back to sparse matrices. |
Date: |
Thu, 5 Mar 2009 15:05:09 -0500 |
On 5-Mar-2009, Jaroslav Hajek wrote:
| On Thu, Mar 5, 2009 at 7:55 PM, Jason Riedy <address@hidden> wrote:
| > With this change, diag ([1;2;3]) * sprand (3, 3, .5) will produce a
| > scaled sparse matrix. Single-precision sparse matrices are not yet
| > supported in Octave, so the single-precision diagonal matrices still
| > fall back to dense.
|
| This is, IMHO, an important catch that didn't occur to me before. I
| can't say I like it much, although it's logical (given the absence of
| single precision sparse matrices). It's no problem for the operations,
| actually; (single) full * (double) sparse does not work anyway. But
| for other stuff (like assigning to a diag matrix), it seems
| potentially confusing.
| John, what do you think?
Shouldn't something like
single (diag ([1,2,3])) * speye (3)
just fail if single * sparse is not implemented?
jwe