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

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

[Octave-bug-tracker] [bug #52009] allow creation of 1-by-1 array with a


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #52009] allow creation of 1-by-1 array with a single function handle
Date: Fri, 15 Sep 2017 12:22:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #5, bug #52009 (project octave):

I wonder if this could be handled (and would make sense to handle) in
octave::tree_evaluator::visit_matrix with a special case. If the dimensions of
the matrix expression are 1×1, there is no need to do any concatenation or
resizing of the arguments. The result would just be the single object in the
matrix expression as-is.

If this were only done for the 'else' case (non-numeric types) this should be
safe. If it were done for all types it would break the case where '[1:10]' is
turned into a normal Matrix, I don't think we want that.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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