On Mon, Jun 05, 2006 at 08:52:17AM +0100, Simon Burton wrote: > > Is it possible to use the where function in numexpr ? > I see some code there for it, but not sure how to use it.
Yes; 'where(expression, a, b)' will return an element from 'a' when 'expression' is non-zero (true), and the corresponding element from 'b' when it's 0 (false). > While I'm asking, it seems numexpr only does pointwise > operations ATM, ie there is no .sum ? Adding reducing functions is on the list of things to-do. I don't have much time for it now, unfortunately. -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |[EMAIL PROTECTED] _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion