From: David M. C. <co...@ph...> - 2006-06-05 00:24:14
|
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/ |co...@ph... |