[Numpy-discussion] how to vectorize a row of eigenvalue computations ?

2008-10-16 Thread LB
gvalsh( np.array( [ [ S[0], S[3], S[5]], [ S[3], S[1], S[4]], [ S[5], S[4], S[2]], ])) return p_stresses.sort() p_stresses = array([ calc_principal_stresses(s) for s in S]) Aside putting the sort function outside the loop, is there any way to optimize or vectori

[Numpy-discussion] how to freeze a numpy based script ?

2008-09-01 Thread LB
t; python2.5 -c 'import numpy; print numpy.__version__; import > numpy.core.multiarray; print "no pb"' 1.2.0b2 no pb Have you got any recipe to freeze numpy based script ? Regards, -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread LB
very fast and labels like "array creation", "shape manipulation","index operation", "arithmetic", ...etc, could simplify this kind of search. -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.or

[Numpy-discussion] First steps with f2py and first problems...

2008-05-08 Thread LB
f2py -c -m hastings hastings.f90 --fcompiler=gnu95 - configuration----- I'm using debian testing, and I got the following information at the bottom of `f2py -h` : Version: 2_4422 numpy Version: 1.0.4 Requires:Python 2.3 or higher. License: NumPy license (see LICENSE.txt in the NumPy source code) Have you got any clue to solve this pb ? -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Ticket #605 Incorrect behavior of numpy.histogram

2008-04-07 Thread LB
e=> values outside of this range are allocated to the closest bin For the default behavior, most of the case, the sum of the bins 's population should be equal to the size of the original one for me, so I would prefer discard=None. But I'm also okay with

[Numpy-discussion] BUG with numpy.float64.tolist() ?

2008-03-18 Thread LB
scipy-user/browse_thread/thread/47fefa8e519c85f6?hl=fr). Did I miss something or should I add an entry to the bugtracker ? -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.test() fails if it runs after scipy.test()

2008-02-28 Thread LB
orks ii python-numpy 1:1.0.4-5Numerical Python adds a fast array facility to the Python language ii python-scipy 0.6.0-5.1scientific tools for Python un python-soappy (aucune description n'est disponible) -- LB _

Re: [Numpy-discussion] Vectorizing a function

2008-01-30 Thread LB
Thank you Gael, I think this could work for my case. It will be a bit tricky, since calc_0d is already a closure in which I've defined a function : the parameters x and y are to main parameters of an ODE. So calc_0d define a function, integrate it sing scipy.integrate.odeint and returns some chara

[Numpy-discussion] Vectorizing a function

2008-01-30 Thread LB
arameters and only the x and y arguments should be interpreted with the broadcasting rules What is the "good way" for doing this ? Regards, -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Appending a numpy array to existing text file

2007-11-27 Thread LB
If you just want to add your matrix to an existing ascii file, you can open this file in append mode and give the file handle to numpy.savetxt : f_handle = file('my_file.dat', 'a') savetxt(f_handle, my_matrix) f_handle.close() HTH -- LB _

[Numpy-discussion] Improving numpy.interp

2007-11-08 Thread LB
... >>> >>> interp(x, xp, yp) 7.7011 >>> interp([x,2*x], xp, yp) array([ 7.7, 38.5]) -- LB ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion