bugGNU Octave - Bugs: bug #36463, Mixed data type operations not...

 
 

bug #36463: Mixed data type operations not supported with sparse matrices

Submitter:  Nir Krakauer <nir_krakauer>
Submitted:  Mon 14 May 2012 02:33:23 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Assigned to:  dbateman
Originator Name:  Nir Krakauer Open/Closed:  * Closed
Release:  * 3.6.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 21 May 2012 07:18:20 PM UTC, comment #3: 

In this case this bug should be marked as "won't fix" and be closed

D.

David Bateman <dbateman>
Group Member
Mon 21 May 2012 11:10:37 AM UTC, comment #2: 

Converting single or {u,}int{8,16,32,64} types to double when using sparse matrices would be inconsistent with what happens for full matrices and scalars.

For example, try


class (uint32 (42) + rand (3))
class (single (42) + rand (3))


Given that we don't have single or integer sparse matrices, I think the right thing to do is throw an error.  If you want the conversion, you will have to do it explicitly.

John W. Eaton <jwe>
Group administrator
Sun 20 May 2012 11:00:03 PM UTC, comment #1: 

Firstly does Matlab itself support these mixed operators? If not I propose to do nothing for this bug. If not promoting the integer types to double would be the means of treating this, as only the files op-intx.h and op-int.h would need to be modified.

I don't have access to matlab, so could you tell me if matlab (rather than the user type you pointed to on matlabcentral) supports these mixed types?

D.

David Bateman <dbateman>
Group Member
Mon 14 May 2012 02:33:23 AM UTC, original submission:  

Mixed operations involving sparse matrices and non-double arrays or scalars currently return errors:


speye(2) + uint32(3)
error: binary operator `+' not implemented for `sparse matrix' by `uint32 scalar' operations


speye(2) * eye(2, "single")
error: binary operator `*' not implemented for `sparse matrix' by `float matrix' operations



It would be useful for such operations to give sensible results, if necessary even by automatically promoting non-double arguments to double, as in http://www.mathworks.com/matlabcentral/fileexchange/26181-robust-sparse-data-types


Nir Krakauer <nir_krakauer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by nir_krakauer (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-05-21 dbateman StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
    2012-05-20 dbateman StatusNone Need Info
        Assigned toNone dbateman

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code