From: Keith G. <kwg...@gm...> - 2006-11-12 21:57:19
|
Is anybody interested in making x.max() and nanmax() behave the same for matrices, except for the NaN part? That is, make numpy.matlib.nanmax return a matrix instead of an array. Example ===== >> import numpy.matlib as M >> x = M.rand(3,2) >> x.max(0) matrix([[ 0.91749823, 0.94942954]]) >> M.nanmax(x, 0) array([ 0.91749823, 0.94942954]) |