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

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

[Octave-patch-tracker] [patch #8386] Fixed up "find" function with templ


From: John W. Eaton
Subject: [Octave-patch-tracker] [patch #8386] Fixed up "find" function with templates and fourth parameter
Date: Thu, 20 Mar 2014 05:06:12 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130917 Firefox/17.0 Iceweasel/17.0.9

Follow-up Comment #5, patch #8386 (project octave):

Functions like max, min, sum, any, etc., all work along dimension 1 by default
and return an array that has one fewer dimension than the original array.  So
it makes sense for those functions to accept an argument that specifies the
dimension over which to operate.  Although the DIM argument of these functions
affects the shape of the result, it does not specify it directly.  The shape
of the original array is also a factor (consider the case of arrays of more
than two dimensions).

The find function just returns a collection of linear indices based on column
major ordering.  The shape of that collection is not related to the shape of
the original array.  So it makes sense for the result to always just have a
single orientation.

I don't understand what you mean by "the only stable use of "find" on a matrix
is to just always pair it with a reshape".

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8386>

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




reply via email to

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