Re: [Numpy-discussion] Numpy/Fortran puzzle (?)

2014-08-21 Thread Xavier Barthelemy
Hi Andrea You should add a dimension argument in your Fortran code, also you should write a f2py header in the same Fortran code. Remember, numpy memory is C order wise. You can specify in numpy the ordering of the matrices you pass when you create them. F2py automatically deals with matrices , but

Re: [Numpy-discussion] what do I get if I build with MKL?

2013-04-19 Thread Xavier Barthelemy
One major advantage you can have using mkl is installing "numexpr" compiling it with MLK. That's a strong suggestion to easily use mkl and go faster on common operations. Xavier On 20/04/2013 1:16 AM, "Matthieu Brucher" wrote: > The graph is a comparison of the dot calls, of course they are bett

Re: [Numpy-discussion] idea of optimisation?

2011-12-07 Thread Xavier Barthelemy
Actually this can be a good idea. i didn't thought using he sorting. i'll try thanks for yours ideas Xavier 2011/12/7 Tony Yu > > > On Tue, Dec 6, 2011 at 2:51 AM, Xavier Barthelemy wrote: > >> ok let me be more precise >> >> I have an Z array which i

Re: [Numpy-discussion] idea of optimisation?

2011-12-06 Thread Xavier Barthelemy
Yes I understood what you said. I know these tools, and I am using them. I was just wandering if someone has a more one-liner-pythonic way to do it. I don't think it's worth importing a new fortran module. Thanks anyway :) Xavier 2011/12/6 David Froger > Excerpts from Xavier Barthelemy's message

Re: [Numpy-discussion] idea of optimisation?

2011-12-05 Thread Xavier Barthelemy
ok let me be more precise I have an Z array which is the elevation from this I extract a discrete array of Zero Crossing, and another discrete array of Crests. len(crest) is different than len(Xzeros). I have a threshold method to detect my "valid" crests, and sometimes there are 2 crests between

[Numpy-discussion] idea of optimisation?

2011-12-05 Thread Xavier Barthelemy
Hi everyone I was wondering if there is a more optimal way to write what follows: I am studying waves, so I have an array of wave crests positions, Xcrest and the positions of the ZeroCrossings, Xzeros. The goal is to find between which Xzeros my xcrest are. XXX1=XCrest CrestZerosNeighbour=np.z

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread Xavier Barthelemy
print "Initiating the running total of my > variable..." > running_sum=N.array(TSFC[i]) > > TSFC_avg=N.true_divide(running_sum, slice_counter) > N.set_printoptions(threshold='nan') > print "the TSFC_avg is:

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread Xavier Barthelemy
Hi, I don't know if it is the best choice, but this is what I do in my code: for each slice: indexnonNaN=np.isfinite(SliceOf Toto) SliceOf TotoWithoutNan= SliceOf Toto [indexnonNaN] and then perform all operation I want o on the last array. i hope it does answer your question Xavier 2011/

Re: [Numpy-discussion] compiling and linking MKL with numpy/scipy

2011-11-23 Thread Xavier Barthelemy
re, in case it might help. > I always had trouble getting programs (other than numpy though) to link > and execute properly with MKL. > You might also try to play with LD_PRELOAD. > Good luck, > > -=- Olivier > > 2011/11/23 Xavier Barthelemy > >> Dear

Re: [Numpy-discussion] compiling and linking MKL with numpy/scipy

2011-11-22 Thread Xavier Barthelemy
Dear everyone I have been a bit better patching the files I finally get something in .basrc source /opt/intel/composer_xe_2011_sp1.7.256/bin/compilervars.sh intel64 source /opt/intel/composer_xe_2011_sp1.7.256/mkl/bin/mklvars.sh intel64 lp64 export OMP_NUM_THREADS=4 export KMP_AFFINITY=verbose,

[Numpy-discussion] compiling and linking MKL with numpy/scipy

2011-11-22 Thread Xavier Barthelemy
dear everyone, I am hard trying to compile numpy / and scipy with mkl. unfortunately it does not work. i have tried a lot of solution, and the closest for me to work is: *I have * Linux manning 2.6.32-27-server #49-Ubuntu SMP Thu Dec 2 02:05:21 UTC 2010 x86_64 GNU/Linux python -c 'import os,