Re: Numeric help!

2006-07-03 Thread Sheldon
Carl Banks wrote: > Sheldon wrote: > > average(compress(ravel(equal(wk,z)),ravel(sattmp)),axis=None) > > This is much more compact and elegant. Thanks for pointing this out. > > I don't know why average() returned a divide by zero error and to avoid > > this I inserted this if statement. Now it

Re: Numeric help!

2006-06-30 Thread Carl Banks
Sheldon wrote: > average(compress(ravel(equal(wk,z)),ravel(sattmp)),axis=None) > This is much more compact and elegant. Thanks for pointing this out. > I don't know why average() returned a divide by zero error and to avoid > this I inserted this if statement. Now it works much better ! Probably

Re: Numeric help!

2006-06-30 Thread Sheldon
Carl Banks wrote: > Sheldon wrote: > >Carl Banks wrote: > >> I'm not sufficiently sure this isn't a homework problem, so here's a > >> partial answer. > [snip] > > > > My days as a student is over for the most part. I am learning python on > > my own and Numeric is not properly documented so I am l

Re: Numeric help!

2006-06-29 Thread Alan Isaac
On Thu, 29 Jun 2006 05:25:25 -0400, Sheldon <[EMAIL PROTECTED]> wrote: > I am learning python on > my own and Numeric is not properly documented 1. Use NumPy (Numeric's successor): http://www.numpy.org/ 2. Documentation is excellent: http://www.tramy.us/ (Also see http://www.scipy.org/Cookbook

Re: Numeric help!

2006-06-29 Thread Carl Banks
Sheldon wrote: >Carl Banks wrote: >> I'm not sufficiently sure this isn't a homework problem, so here's a >> partial answer. [snip] > > My days as a student is over for the most part. I am learning python on > my own and Numeric is not properly documented so I am learning by doing > and copying fro

Re: Numeric help!

2006-06-29 Thread Sheldon
Hi Carl, My days as a student is over for the most part. I am learning python on my own and Numeric is not properly documented so I am learning by doing and copying from others. I thought about the problem and a solution another problem given to me earlier using "putmask" is the solution but there

Re: Numeric help!

2006-06-28 Thread Carl Banks
Sheldon wrote: > Hi, > > I have the following loop that I think can be written to run faster in > Numeric. I am currently using Numeric. > range_va = [60,61,62,63,64,65,66,67,68,69,70,71,72] > main.xsize= 600 > main.ysize= 600 > #msgva is an (600x600) Numeric array with mutiple occurrences of the >

Numeric help!

2006-06-28 Thread Sheldon
Hi, I have the following loop that I think can be written to run faster in Numeric. I am currently using Numeric. range_va = [60,61,62,63,64,65,66,67,68,69,70,71,72] main.xsize= 600 main.ysize= 600 #msgva is an (600x600) Numeric array with mutiple occurrences of the values in range_va #sat_id is a