Is it possible to use the where function in numexpr ? I see some code there for it, but not sure how to use it. While I'm asking, it seems numexpr only does pointwise operations ATM, ie there is no .sum ? Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
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/ |cookedm@physics.mcmaster.ca
participants (2)
-
David M. Cooke -
Simon Burton