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

[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/




reply via email to

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