bugGNU Octave - Bugs: bug #35921, assigning empty to non-double types

 
 

bug #35921: assigning empty to non-double types

Submitted by:  None
Submitted on:  Tue 20 Mar 2012 11:30:46 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  dev
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Sat 04 Jan 2014 02:11:48 AM UTC, comment #2: 

I checked in the following changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/cda4bd2fd0c0

John W. Eaton <jwe>
Project Administrator
Tue 06 Aug 2013 01:33:52 AM UTC, comment #1: 

Confirmed on the development version of Octave as well. I only see this error when the right-hand side is a scalar (matrix of size 1).

Also can confirm that this is not the same as bug #31278. That bug was a regression of something that used to work in Octave 3.0.x. This one has never worked AFAICT. The error message for this bug in Octave 3.0.5 was

> iarray(1) = [];
error: operator =: no conversion for assignment of `matrix' to indexed `int64 scalar'
error: assignment failed, or no method for `int64 scalar = matrix'
error: evaluating assignment expression near line 10, column 11

Mike Miller <mtmiller>
Project Administrator
Tue 20 Mar 2012 11:30:46 PM UTC, original submission:  

There appears to be an error in assigning empty values to arrays of type other than double:

iarray = int64( [1 2] );
darray = double( [1 2] );

iarray(1) = [];
darray(1) = [];
% works, iarray & darray = [2] now

iarray(1) = [];
% error: A(I) = X: X must have the same size as I

darray(1) = [];
% works; returns empty 1x0 array

This seems closely related to open bug #31287: Certain assignments of empty arrays give errors (Matlab incompatibility), but perhaps not the same, since that bug involves assignments whos left-hand-sides are also empty (rather than becoming empty), and does not seem to depend on the data type.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

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 mtmiller (Posted a comment)
  •  

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

    Only project members can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-04 jwe StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2013-10-17 rik5 Dependencies- => Depends on bugs #31287
    2013-08-06 mtmiller CategoryNone => Interpreter
        Item GroupNone => Incorrect Result
        StatusNone => Confirmed
        Release3.6.1 => dev
        Operating SystemGNU/Linux => Any

    Back to the top


    Powered by Savane 3.5