Re: [Numpy-discussion] Segmentation fault with pickled numpy float64 arrays since 1.8

2013-12-21 Thread Hugo Gagnon
Mac OS 10.8.5 -- Hugo Gagnon On 2013-12-21, at 5:20 PM, Charles R Harris wrote: > > > > On Sat, Dec 21, 2013 at 2:16 PM, Hugo Gagnon > wrote: > Hi, > > Since I've updated numpy from 1.7 to 1.8 with EPD I get segmentation faults > whenever I load back p

[Numpy-discussion] Segmentation fault with pickled numpy float64 arrays since 1.8

2013-12-21 Thread Hugo Gagnon
x27;wb') as fh: cPickle.dump(a, fh) with open('test.p') as fh: a2 = cPickle.load(fh) print a2 """ However the above works fine with int32 arrays, i.e. with a = numpy.arange(5). Does anyone else experience this problem? Thanks, -- Hugo Gagnon __

[Numpy-discussion] Setter on array

2013-08-14 Thread Hugo Gagnon
Hi, What is the best way, if any, to "do something" whenever array elements are changed in-place? For example, if I have a = arange(10), then setting a[3] = 1 would, say, call a function automatically. Thanks, -- Hugo Gagnon ___ NumPy-

[Numpy-discussion] distutils seems to pick the wrong fortran compiler flags

2013-08-05 Thread Hugo Gagnon
77", "compiler_f90" and "linker_so" keys of the "executables" dictionary of the "Gnu95FCompiler" class (line 251). I'm sure there's a nicer way to do that though... -- Hugo Gagnon ___ NumPy-

Re: [Numpy-discussion] Viewing a float64 array with a float32 array

2012-03-21 Thread Hugo Gagnon
I'm not sure if you are referring to rounding errors but that's OK with me. I was thinking something along the lines of changing how numpy looks at the data of A's view by modifying say the stride attribute, etc. -- Hugo Gagnon On Wed, Mar 21, 2012, at 11:19, Zachary Pincu

[Numpy-discussion] Viewing a float64 array with a float32 array

2012-03-21 Thread Hugo Gagnon
Hi, Is it possible to have a view of a float64 array that is itself float32? So that: >>> A = np.arange(5, dtype='d') >>> A.view(dtype='f') would return a size 5 float32 array looking at A's data? Thanks, -- Hugo Gagnon _

[Numpy-discussion] "trapezoidal" grids

2012-02-10 Thread Hugo Gagnon
Hello, Say I have four corner points a = (X0, Y0), b = (X1, Y1), c = (X2, Y2) and d = (X3, Y3): a--b \/ \ / cd Is there a function like meshgrid that would return me a grid of points linearly interpolating those four corner points? Thanks,

[Numpy-discussion] Printing individual array elements with at least 15 significant digits

2011-10-15 Thread Hugo Gagnon
Hello, I need to print individual elements of a float64 array to a text file. However in the file I only get 12 significant digits, the same as with: >>> a = np.zeros(3) >>> a.fill(1./3) >>> print a[0] 0. >>> len(str(a[0])) - 2 12 whereas >>> len(repr(a[0])) - 2 17 which makes more

[Numpy-discussion] Array views

2011-03-26 Thread Hugo Gagnon
apparently copying occurs. I tried it the other way around i.e. a1 = b[:,0] a2 = b[:,1] ... and it works but that doesn't help me for my problem. Is there a way to reformulate the first code snippet above but with shallow copying? Thanks, -- Hugo Gagnon -

Re: [Numpy-discussion] index of minimum of array

2007-04-13 Thread Hugo
nough > See Also for min() and max() refer to argmin() and argmax(). Perhaps in this particular case it would be nice to have a See Also for 'nan' at argmin() and argmax(), since there is info about nanargmin and nanargmax(). Hugo ___ Numpy-discussion mailing list [EMAIL PROTECTED] http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] endianness ufuncs

2007-04-13 Thread Hugo
les the endianness transparently. For now I'm happy with just converting everything to native (little) endian at the start of my calculations and convert them back in the end. (Although I'm not sure what's the best way to do that yet.) Hugo ___