'any' appears broken for integer data types in octave 3.0
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Feb 7 15:03:01 CST 2008
On 7-Feb-2008, Axel von Kamp wrote:
| Hi,
|
| I have compiled octave version 3.0.0 on 32bit SuSE 10.2.
| When I use the 'any' function it gives incorrect output in case the input is
| an integer data type, e.g.
|
| octave:53> any([0 1 2])
| ans = 1 # OK
| octave:54> any(uint32([0 1 2]))
| ans = 0 # Incorrect
| octave:55> any(eye(3), 1)
| ans =
|
| 1 1 1 # OK
|
| octave:56> any(uint32(eye(3)), 1)
| ans =
|
| 0 0 0 # Incorrect
|
| Apparently, 'any' always returns 0 when the input belongs to an integer class
| (at least in all the cases that I have tested).
Oops, please try the following patch.
jwe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080207/40a441d2/attachment.ksh
More information about the Bug-octave
mailing list