Re: [Numpy-discussion] using loadtxt to load a text file in to a numpy array

2014-01-17 Thread Freddie Witherden
On 17/01/14 13:09, Aldcroft, Thomas wrote: > I've been playing around with porting a stack of analysis libraries to > Python 3 and this is a very timely thread and comment. What I > discovered right away is that all the string data coming from binary > HDF5 files show up (as expected) as 'S' type,

Re: [Numpy-discussion] adding fused multiply and add to numpy

2014-01-09 Thread Freddie Witherden
On 08/01/14 21:39, Julian Taylor wrote: > An issue is software emulation of real fma. This can be enabled in the > test ufunc with npfma.set_type("libc"). > This is unfortunately incredibly slow about a factor 300 on my machine > without hardware fma. > This means we either have a function that is

[Numpy-discussion] Padding An Array Along A Single Axis

2014-01-03 Thread Freddie Witherden
Hi all, This should be an easy one but I can not come up with a good solution. Given an ndarray with a shape of (..., X) I wish to zero-pad it to have a shape of (..., X + K), presumably obtaining a new array in the process. My best solution this far is to use np.zeros(curr.shape[:-1] + (curr

Re: [Numpy-discussion] Robust Sorting of Points

2013-10-29 Thread Freddie Witherden
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/10/2013 12:44, Pierre Haessig wrote: > Hi, > > Le 27/10/2013 19:28, Freddie Witherden a écrit : >> I wish to sort these points into a canonical order in a fashion >> which is robust against small perturbations. In other

Re: [Numpy-discussion] Robust Sorting of Points

2013-10-27 Thread Freddie Witherden
On 27/10/13 21:05, Jonathan March wrote: > If an "almost always works" solution is good enough, then sort on the > distance to some fixed random point that is in the vicinity of your N > points. I had considered this. Unfortunately I need a solution which really does always work. The only pure-P

Re: [Numpy-discussion] Robust Sorting of Points

2013-10-27 Thread Freddie Witherden
On 27/10/13 20:22, josef.p...@gmail.com wrote: > On Sun, Oct 27, 2013 at 3:22 PM, Freddie Witherden > wrote: >> On 27/10/13 18:54, Daniele Nicolodi wrote: >>> On 27/10/2013 19:42, Freddie Witherden wrote: >>>> On 27/10/13 18:35, Nathaniel Smith wrote: >

Re: [Numpy-discussion] Robust Sorting of Points

2013-10-27 Thread Freddie Witherden
On 27/10/13 18:54, Daniele Nicolodi wrote: > On 27/10/2013 19:42, Freddie Witherden wrote: >> On 27/10/13 18:35, Nathaniel Smith wrote: >>> On Sun, Oct 27, 2013 at 6:28 PM, Freddie Witherden >>> wrote: >>>> Hi all, >>>> >>>> This is

Re: [Numpy-discussion] Robust Sorting of Points

2013-10-27 Thread Freddie Witherden
On 27/10/13 18:35, Nathaniel Smith wrote: > On Sun, Oct 27, 2013 at 6:28 PM, Freddie Witherden > wrote: >> Hi all, >> >> This is a question which has been bugging me for a while. I have an (N, >> 3) array where N ~ 16 of points. These points are all unique an

[Numpy-discussion] Robust Sorting of Points

2013-10-27 Thread Freddie Witherden
Hi all, This is a question which has been bugging me for a while. I have an (N, 3) array where N ~ 16 of points. These points are all unique and separated by a reasonable distance. I wish to sort these points into a canonical order in a fashion which is robust against small perturbations. In o