bugGNU Octave - Bugs: bug #32096, A cs-list cannot be further indexed

 
 

bug #32096: A cs-list cannot be further indexed

Submitted by:  Pascal Dupuis <cdemills>
Submitted on:  Tue 11 Jan 2011 02:19:00 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Pascal DupuisOpen/Closed: Closed
Release: 3.3.54Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 12 Jan 2011 03:46:01 PM UTC, comment #3:

Well, not really; you can make numel() return what you want, but your indexing must be consistent with it. In other words, if you want dot-indexing, it must behave like struct arrays do, including numel, there is no other way. Blame MathWorks for this.

Jaroslav Hajek <highegg>
Wed 12 Jan 2011 09:53:46 AM UTC, comment #2:

The famous numel. It seems that for an object, numel must equal 1. Reverting to this behavior solved the problem.

Thanks, this bug report is thus void.

Pascal Dupuis <cdemills>
Project Member
Tue 11 Jan 2011 06:10:05 PM UTC, comment #1:

What does numel(x) give you?
Assignments like x.field(index) = something are only allowed if numel(x) == 1.

Jaroslav Hajek <highegg>
Tue 11 Jan 2011 02:19:00 PM UTC, original submission:

Context: testing dataframes (version from octave-forge repo) under 3.3.54+

x=dataframe(randn(3,3)) : OK
x.types(2)
ans =
{
[1,1] = double
}
OK: a cellstr with the type of the second column

x.types(2) = 'single'
error: a cs-list cannot be further indexed
error: invalid assignment to cs-list outside multiple assignment

The last expression should be handled by subsasgn, it's OK under 3.2.3. I added a 'keyboard' statement at the beginning of the overloaded subsasgn function, it is not called. The problem thus occurs before. Any idea ?

Pascal

Pascal Dupuis <cdemills>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by cdemills (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Jan 2011 04:26:28 PM UTChigheggStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1