[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50359] isnull false negative
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #50359] isnull false negative |
Date: |
Mon, 20 Feb 2017 12:39:23 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 |
Update of bug #50359 (project octave):
Status: None => Need Info
_______________________________________________________
Follow-up Comment #1:
What do you mean by "In the documentation, Section 4.3"? I don't see anything
about deletions in "4.3 Single Precision Data Types".
https://www.gnu.org/software/octave/doc/v4.2.0/Single-Precision-Data-Types.html#Single-Precision-Data-Types
What you are referring to is Section "3.3 Object Sizes"
https://www.gnu.org/software/octave/doc/v4.2.0/Object-Sizes.html#XREFisnull
Anyway, I can confirm the example:
>> b=javaArray("java.math.BigDecimal",3)
b =
<Java object: java.math.BigDecimal[]>
>> b(3)=javaObject("java.math.BigDecimal",3.0)
b =
<Java object: java.math.BigDecimal[]>
>> isnull(b(2)) % yields ans = 0
ans = 0
>> isempty(b(2)) % yields ans = 1
ans = 1
>> b(2)
ans = [](0x0)
So why do you expect your example to be true? Can you describe, what you want
to check?
>From the test cases of "isnull" I see:
%!assert (isnull ([]), true)
%!assert (isnull (zeros (0,3)), false)
%!assert (isnull (""), true)
%!assert (isnull (''), true)
%!test
%! x = [];
%! assert (isnull (x), false);
And some own tries yield:
>> isnull (zeros (0,0))
ans = 0
>> isempty (zeros (0,0))
ans = 1
>> zeros (0,0)
ans = [](0x0)
Actually, this function is not Matlab compatible and I don't really know its
purpose. So I don't recommend to use it.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50359>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50359] isnull false negative, Ernst Reissner, 2017/02/20
- [Octave-bug-tracker] [bug #50359] isnull false negative,
Kai Torben Ohlhus <=
- [Octave-bug-tracker] [bug #50359] isnull false negative, Mike Miller, 2017/02/20
- [Octave-bug-tracker] [bug #50359] isnull false negative, Ernst Reissner, 2017/02/21
- [Octave-bug-tracker] [bug #50359] isnull false negative, Kai Torben Ohlhus, 2017/02/21
- [Octave-bug-tracker] [bug #50359] isnull false negative, Ernst Reissner, 2017/02/21
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, Rik, 2017/02/21
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, Mike Miller, 2017/02/21
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, John W. Eaton, 2017/02/23
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, Ernst Reissner, 2017/02/23
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, Mike Miller, 2017/02/23
- [Octave-bug-tracker] [bug #50359] clearer documentation for difference between isnull and isempty, Ernst Reissner, 2017/02/23