[Numpy-discussion] Re: empty_like for masked arrays

2013-06-10 Thread Pierre GM
On June 10, 2013 at 23:07:24 , Eric Firing (efir...@hawaii.edu) wrote: On 2013/06/10 10:17 AM, Aldcroft, Thomas wrote: > I use np.ma , and for me the most intuitive would be the > second option where the new array matches the original array in shape > and dtype, but always has a

Re: [Numpy-discussion] empty_like for masked arrays

2013-06-10 Thread Eric Firing
On 2013/06/10 10:17 AM, Aldcroft, Thomas wrote: > I use np.ma , and for me the most intuitive would be the > second option where the new array matches the original array in shape > and dtype, but always has an empty mask. I always think of the *_like() > functions as just copying sha

Re: [Numpy-discussion] empty_like for masked arrays

2013-06-10 Thread Aldcroft, Thomas
On Mon, Jun 10, 2013 at 3:47 PM, Nathaniel Smith wrote: > Hi all, > > Is there anyone out there using numpy masked arrays, who has an > opinion on how empty_like (and its friends ones_like, zeros_like) > should handle the mask? > > Right now apparently if you call np.ma.empty_like on a masked arr

[Numpy-discussion] empty_like for masked arrays

2013-06-10 Thread Nathaniel Smith
Hi all, Is there anyone out there using numpy masked arrays, who has an opinion on how empty_like (and its friends ones_like, zeros_like) should handle the mask? Right now apparently if you call np.ma.empty_like on a masked array, you get a new masked array that shares the original array's mask,

Re: [Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

2013-06-10 Thread Nathaniel Smith
On Sat, Jun 8, 2013 at 3:15 AM, Arink Verma wrote: > I tried to use pprof, but I can not find profiles to be used. like ls.prof > in "pprof /bin/ls ls.prof" You're looking for the ProfilerStart/ProfilerStop functions, the former takes a filename to write the profiler to (like "ls.prof" or "x-plus

Re: [Numpy-discussion] supporting quad precision

2013-06-10 Thread Henry Gomersall
On Mon, 2013-06-10 at 13:21 +0100, Robert Kern wrote: > > With my work on https://github.com/hgomersall/pyFFTW, which supports > > long double as one of the data types, numpy's long double is > absolutely > > the right way to do this. Certainly I've managed reasonable success > > across the three m

Re: [Numpy-discussion] supporting quad precision

2013-06-10 Thread Robert Kern
On Mon, Jun 10, 2013 at 7:49 AM, Henry Gomersall wrote: > On Sun, 2013-06-09 at 12:23 +0100, David Cournapeau wrote: >> So it depends on the CPU, the OS and the compiler. Using long double >> for anything else than compatibility (e.g. binary files) is often a >> mistake IMO, and highly unportable