Keith Goodman wrote:
x.min() and x.max() depend on the ordering of the elements:
x = M.matrix([[ M.nan, 2.0, 1.0]])
x.min()
nan
x = M.matrix([[ 1.0, 2.0, M.nan]])
x.min()
1.0
If I were to try the latter in ipython, I'd assume, great, min()
ignores NaNs. But then the former would be
On 11/11/06, Robert Kern [EMAIL PROTECTED] wrote:
Barring a clever solution (at least cleverer than I feel like being
immediately), the way to solve this would be to check for nans in the array
and
deal with them separately (or simply ignore them in the case of x.min()).
However, this
On 11/11/06, Robert Kern [EMAIL PROTECTED] wrote:
Keith Goodman wrote: x.min() and x.max() depend on the ordering of the elements: x = M.matrix([[ M.nan, 2.0, 1.0]]) x.min() nan x = M.matrix([[
1.0, 2.0, M.nan]]) x.min() 1.0 If I were to try the latter in ipython, I'd assume, great, min() ignores
Keith Goodman wrote:
How about a nanmin() function?
Already there.
In [2]: nanmin?
Type: function
Base Class: type 'function'
Namespace: Interactive
File:
Robert Kern wrote:
Keith Goodman wrote:
x.min() and x.max() depend on the ordering of the elements:
x = M.matrix([[ M.nan, 2.0, 1.0]])
x.min()
nan
x = M.matrix([[ 1.0, 2.0, M.nan]])
x.min()
1.0
If I were to try the latter in ipython, I'd assume,
On 11/11/06, Robert Kern [EMAIL PROTECTED] wrote:
Keith Goodman wrote:
How about a nanmin() function?
Already there.
In [2]: nanmin?
Type: function
Base Class: type 'function'
Namespace: Interactive
File:
On 11/11/06, Charles R Harris [EMAIL PROTECTED] wrote:
I think the problem is that the max and min functions use the first value in
the array as the starting point. That could be fixed by using the first
non-nan and returning nan if there aren't any real numbers. But it
probably isn't worth
On 11/11/06, Tim Hochberg [EMAIL PROTECTED] wrote:
Robert Kern wrote:snip My preference would be to raise an error / warning when there is a nan
in the array. Technically, there is no minimum value when a nan ispresent. I believe that this would be feasible be swapping the comparefrom 'a b' to
On 11/11/06, Charles R Harris [EMAIL PROTECTED] wrote:
On 11/11/06, Tim Hochberg [EMAIL PROTECTED]
wrote:
Robert Kern wrote:snip My preference would be to raise an error / warning when there is a nan
in the array. Technically, there is no minimum value when a nan ispresent. I believe that this
Robert Kern wrote:
Keith Goodman wrote:
How about a nanmin() function?
Already there.
In [2]: nanmin?
Type: function
Base Class: type 'function'
Namespace: Interactive
File:
On 11/11/06, Tim Hochberg [EMAIL PROTECTED] wrote:
Robert Kern wrote: Keith Goodman wrote: How about a nanmin() function? Already there. In [2]: nanmin? Type: function Base Class: type 'function'
Namespace:Interactive File:
Charles R Harris wrote:
On 11/11/06, *Tim Hochberg* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Robert Kern wrote:
Keith Goodman wrote:
How about a nanmin() function?
Already there.
In [2]: nanmin?
Type: function
12 matches
Mail list logo