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

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

[Octave-bug-tracker] [bug #43925] isscalar behaves incorrectly for some


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #43925] isscalar behaves incorrectly for some user-defined classes
Date: Thu, 19 May 2016 19:13:40 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #20, bug #43925 (project octave):

I _think_ I understand what's going on here. At least you seem to have done
thorough investigation into the differences between ndims, numel, and size.

I also wonder why size is not const, I suspect it's only because
octave_class::size calls octave_class::in_class_method, which calls
octave_class::find_parent_class which is non-const. We can easily check for
other overrides of octave_base_value::size (at least in Forge repositories) to
see if there are any non-const usages out there.

I also wonder if we shouldn't fix octave_class::columns and octave_class::rows
along with this change, so that at least stays consistent. I would find it
confusing if rows(x) returns one thing at the interpreter level, but
value.rows() returns something completely different in C++.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43925>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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