[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45589] sparse is fussy about dimension mismat
From: |
Ceral Paquet |
Subject: |
[Octave-bug-tracker] [bug #45589] sparse is fussy about dimension mismatching |
Date: |
Mon, 20 Jul 2015 21:16:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0 |
URL:
<http://savannah.gnu.org/bugs/?45589>
Summary: sparse is fussy about dimension mismatching
Project: GNU Octave
Submitted by: octavebugs
Submitted on: Mon 20 Jul 2015 09:16:15 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: GNU/Linux
_______________________________________________________
Details:
It's not really a bug, just a difference between sparse and full matrices. I
guess sparse should be tolerant of this kind of abuse, just like it's full
sibling :)
>> A=zeros(4,4);
>> A(:,1) = 1:4
A =
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
>> A=sparse(4,4);
>> A(:,1) = 1:4
error: A(I,J,...) = X: dimensions mismatch
>> A(:,1) = (1:4)'
A =
Compressed Column Sparse (rows = 4, cols = 4, nnz = 4 [25%])
(1, 1) -> 1
(2, 1) -> 2
(3, 1) -> 3
(4, 1) -> 4
>> full(A)
ans =
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45589>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45589] sparse is fussy about dimension mismatching,
Ceral Paquet <=