[bug #68095] [octave forge] (nan) Failing unit tests for histo2 and histo3 with Octave 11

Rafael Laboissière <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

URL:
  <https://savannah.gnu.org/bugs/?68095>

                 Summary: [octave forge] (nan) Failing unit tests for histo2
and histo3 with Octave 11
                   Group: GNU Octave
               Submitter: rlaboiss
               Submitted: Thu 26 Feb 2026 07:20:50 PM UTC
                Category: Octave Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Unlocked
                 Release: other
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 26 Feb 2026 07:20:50 PM UTC By: Rafael Laboissière <rlaboiss>
With Octave 11, two unit tests of the nan package (version 3.7.0)  fail:


octave:2> test histo2
***** assert(getfield(histo2([]),'N'), 0)
!!!!! test failed
ASSERT errors for:  assert (getfield (histo2 ({}), 'N'),0)

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x0)       E(1x1)      Dimensions don't match
octave:2> test histo3
***** assert(getfield(histo3([]),'N'), 0)
!!!!! test failed
ASSERT errors for:  assert (getfield (histo3 ({}), 'N'),0)

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x0)       E(1x1)      Dimensions don't match


This is a regression compared to Octave 10. I think the reason is a change in
the sum function's behavior between versions 10 and 11.

With Octave 10:


octave:1> sum([])
ans = 0
octave:2> sum([], 1)
ans = 0


With Octave 11:


octave:1> sum([])
ans = 0
octave:2> sum([], 1)
ans = [](1x0)


The regression may be in Octave. If so, please retitle and reassign this bug
report.








    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaaCdGQAKCRCqLAuaBUf3
Tp4jAQDYEq8kA8CvBesWtzcdmFO1Fxmz+btW65AN3ocnrdaPHwD+I4iCAuxQwMfD
LTI7l3D1AdcLqtmmTlqW556LEKCLGQY=
=Gtrl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.