octave-maintainers
[Top][All Lists]
Advanced

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

Re: [PATCH] Add min/max tests. (4/4)


From: Edward Jason Riedy
Subject: Re: [PATCH] Add min/max tests. (4/4)
Date: Wed, 13 Sep 2000 14:47:37 -0700

And "John W. Eaton" writes:
 - 
 - So, I think what is really needed is some way to tell the min and 
 - max funtions what comparison operation (or function) to use.

Sorry for the long delay.  This is the right thing, but it's 
terribly painful in a Matlab-like language.  And if you're
not tied to a Matlab-like language, why not use Python?  ;)

BTW, my patch makes Octave work pretty much like Matlab, which
is also somewhat broken.  If that's not what you want, no big 
deal.

 - Also, if it were up to me (or if I could do it over again) I would
 - want to avoid the problem that results from min, max, and other
 - functions working on columns of a matrix except when the matrix
 - happens to have only one row.

Or define a generalized reduction method (which is how I re-
worked column_min and family in the C++ code) and certain 
reduction op selectors (e.g. by type of matrix (Matlab), by 
type of the to-be-reduced slice (Octave's treatment of 
different columns differently), etc.).  The former is handled 
by `ufuncs' in Numpy, but I don't think anyone's quite 
approached the latter.  The strange selection by dynamically
determined slice type doesn't sit well with my mental model 
of what's going on, so I'm not too enthusiastic about it.

Jason



reply via email to

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