Re: [Numpy-discussion] Replacing values based on index

2010-08-11 Thread Geordie McBain
2010/8/12 Pinner, Luke : > Apologies if this has been asked many times before, but I'm having > trouble even coming up with the right terms to search on. > > I have an x,y,date stack of satellite images from which I need to know > on what date the max and min values occur. I can calculate the index

Re: [Numpy-discussion] how to fit a given pdf

2010-08-11 Thread Geordie McBain
2010/8/12 Renato Fabbri : > Dear All, > > help appreciated, thanks in advance. > > how do you fit a pdf you have with a given pdf (say gamma). > > with the file attached, you can go like: > > a=open("AC-010_ED-1m37F100P0.txt","rb") > aa=a.read() > aaa=aa[1:-1].split(",") > data=[int(i) for i in aaa

Re: [Numpy-discussion] numpy.ma.flatnotmasked_contiguous error in slice.stop values?

2010-08-08 Thread Geordie McBain
2010/8/9 Pierre GM : > OK, mind opening a ticket ? I'll try to take care of that tmw and I don't > want the bug report to fall between the cracks. Done. http://projects.scipy.org/numpy/ticket/1576. Thank you for your very prompt and helpful response. I wasn't aware of the ticket system previous

[Numpy-discussion] numpy.ma.flatnotmasked_contiguous error in slice.stop values?

2010-08-08 Thread Geordie McBain
The function numpy.ma.flatnotmasked_contiguous returns slices which miss the last element; for example, based on the example at http://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.flatnotmasked_contiguous.html, import numpy as np a = np.arange (10) am = np.ma.array (a, mask = (a < 3) | (a