From: Perry G. <pe...@st...> - 2005-05-17 15:44:12
|
On May 17, 2005, at 11:30 AM, John Hunter wrote: >>>>>> "Perry" == Perry Greenfield <pe...@st...> writes: > > Perry> It's simpler in numarray: > > Perry> i,j = where(z<0.5) > > Perry> For numeric it's more work: > > Perry> ind = where(z.flat < 0.5) i = ind//z.shape[1] j = ind % > Perry> z.shape[1] > > Perry> One could turn this into a function for Numeric (to handle > Perry> all dimensionalities, etc) > > I think you meant to use "nonzero" rather than "where" for Numeric... Yes, indeed. |