Re: [Numpy-discussion] Can this be done efficiently with array functions?

Janko and Paul, Thanks for your suggestions. I had come up with something like Janko's solution, but not as cleanly. It seems that Paul's suggestion is essentially the same thing. Maybe I'll do some tests to see which is faster. By the way, I tried Janko's code, and got an error on "a == 0" (I'm running Python 2.0). I looked at it again, and then looked at the release notes for Python 2.1, and saw that rich comparisons are working..Glory be! I'll be upgrading real soon, just for that! thanks again, -Chris PS: anyone have a response for my Int32 question? Why isn't it a "long" on Linux or windows on Intel? Janko Hauser wrote:
"Paul F. Dubois" wrote:
That will be great if you get a chance.
Meanwhile you could do something like this, where x is your array:
WOW, I'm impressed, I had assumed that some C was involved. Nice job.
More seriously, there are a few semantic issues where it isn't clear what you mean if a mask is present.
I'm sure these could be resolved. It would be nice if we could have in mind to move in that direction. I'm not going ot be able to do any of the coding, so that's the last you'll here from me about it. -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------
participants (1)
-
Chris Barker