[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57533] Incorrect error message when assigning
From: |
Clint |
Subject: |
[Octave-bug-tracker] [bug #57533] Incorrect error message when assigning to a subset of a 3+ dimensional array |
Date: |
Fri, 3 Jan 2020 15:25:39 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0 |
URL:
<https://savannah.gnu.org/bugs/?57533>
Summary: Incorrect error message when assigning to a subset
of a 3+ dimensional array
Project: GNU Octave
Submitted by: terikin
Submitted on: Fri 03 Jan 2020 08:25:37 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Clint
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: Any
_______________________________________________________
Details:
When making an assignment to a subset of a higher-dimensional array, the error
message can list incorrect dimensionality for op1. The error message is
correct when the matrix receiving the assignment has only two dimensions.
Example of code giving incorrect error:
a = zeros(2, 2, 1);
b = ones(2, 2);
a(1, :, 1) = b;
>> error: =: nonconformant arguments (op1 is 2x2x1, op2 is 2x2)
But it is readily apparent that op1 is actually 1x2x1.
In contrast, when a is 2x2:
a = zeros(2, 2);
b = ones(2, 2);
a(1, :) = b;
>> error: =: nonconformant arguments (op1 is 1x2, op2 is 2x2)
Here, the error message correctly reports the dimensionality of the subset of
a that is being assigned to.
I've seen the same behavior in version 5.1.0 on Windows 10 and in version
4.2.2 on Ubuntu Linux.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57533>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57533] Incorrect error message when assigning to a subset of a 3+ dimensional array,
Clint <=