octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong num


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers
Date: Tue, 11 Jan 2022 10:43:30 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Follow-up Comment #8, bug #61788 (project octave):

We could begin by keeping the special range type for floating point ranges (as
in previous versions of Octave) but making integer range expressions always
generate arrays.  This change is very low risk because integer range
expressions were not supported in previous versions of Octave.  For example,
in Octave 6 and earlier versions:


octave:1> x = uint8(1):uint8(10)
x =

    1    2    3    4    5    6    7    8    9   10

octave:2> class (x)
ans = double


which was not Matlab compatible, so fixing compatibility in this case could
mean 

0 generating a uint8 object from the range expression
0 generating an array instead of a special range object

In a later version (when we have had more time for testing) we could make
Octave also generate arrays by default for floating point range expressions.

To make maintenance easier, I would be in favor of simply eliminating range
objects entirely, but if we do keep them, I would argue for making that
behavior optional with the default being to create arrays from range
expressions.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61788>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]