Re: [Numpy-discussion] [RFC] should we argue for a matrix power operator, @@?

2014-03-16 Thread Fabrice Silva
Le samedi 15 mars 2014 à 04:32 +, Nathaniel Smith a écrit : Hi all, Here's the second thread for discussion about Guido's concerns about PEP 465. The issue here is that PEP 465 as currently written proposes two new operators, @ for matrix multiplication and @@ for matrix power

Re: [Numpy-discussion] savetxt trouble

2013-02-20 Thread Fabrice Silva
Le mercredi 20 février 2013 à 13:35 +, Robert Kern a écrit : On Wed, Feb 20, 2013 at 1:25 PM, Neal Becker ndbeck...@gmail.com wrote: I tried to save a vector as a csv, but it didn't work. The vector is: a[0,0] array([-0.70710678-0.70710678j, 0.70710678+0.70710678j,

Re: [Numpy-discussion] 3D array problem in Python

2012-12-30 Thread Fabrice Silva
Le dimanche 30 décembre 2012 à 16:47 +0400, Happyman a écrit : Actually These two functions namely F1 and F2 are really exponential and Bessel functions respectively. But I can not change its analytic form.. I mean is there way to get more quickly the result? Let's say above mentioned two

[Numpy-discussion] Adding solvers to scipy.integrate [Was: A step toward merging odeint and ode]

2012-08-21 Thread Fabrice Silva
improvements. He is cc'ed of this mail, could anyone concerned about scipy license requirements and more generally in code licensing answer him ? Regards -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] A step toward merging odeint and ode

2012-08-16 Thread Fabrice Silva
/FabricioS/scipy/commit/f867f2b8133d3f6ea47d449bd760a77a7c90394e -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] A step toward merging odeint and ode

2012-08-15 Thread Fabrice Silva
Le mardi 14 août 2012 à 21:21 +0200, Ralf Gommers a écrit : On Sun, Aug 12, 2012, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: I made a pull request [1] to integrate the LSODA solver that is used in odeint into the modular scipy.integrate.ode generic class. In a similar

[Numpy-discussion] A step toward merging odeint and ode

2012-08-12 Thread Fabrice Silva
the coefficients before calling lsoda. Note that lsoda provide automatic switching between stiff and non-stiff methods, feature that is not present in the available vode integrator. Final note: tests are ok! Regards, [1] https://github.com/scipy/scipy/pull/273 -- Fabrice Silva

Re: [Numpy-discussion] Second try: possible bug in assignment to complex array

2012-08-10 Thread Fabrice Silva
(b) In [8]: a[0] = b.squeeze() -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-17 Thread Fabrice Silva
be a problem with the way you wrote the test case. Sorry, I forgot to update the archive... Here new one that lead (on my machine) to failure with coverage -- Fabrice Silva mypackage.tar Description: Unix tar archive ___ NumPy-Discussion mailing list NumPy

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-17 Thread Fabrice Silva
Nautilus and file-roller are *** on me... I hope this one is good. Thanks for being patient :) Best regards -- Fabrice Silva mypackage.tar Description: Unix tar archive ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-17 Thread Fabrice Silva
Le jeudi 17 mai 2012 à 11:16 +0200, Ralf Gommers a écrit : On Thu, May 17, 2012 at 10:48 AM, Fabrice Silva si...@lma.cnrs-mrs.frwrote: Nautilus and file-roller are *** on me... I hope this one is good. Thanks for being patient :) That was the right tar file. The issue was the one

[Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread Fabrice Silva
Without coverage, everything is ok. With coverage, I got a (unexpected ?) reload of the modules, leading to a mismatch of types... The real case is somewhat more complicated, and I would prefer to keep the instantiation through a.py. Is there a way to solve the problem ? Best regards -- Fabrice

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread Fabrice Silva
results] Ran 1 test in 0.006s FAILED (failures=1) -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Owndata flag

2011-12-16 Thread Fabrice Silva
-from-pre-allocated-memory/ Within cython: cimport numpy numpy.set_array_base(my_ndarray, PyCObject_FromVoidPtr(pointer_to_Cobj, some_destructor)) Seems OK. Any objections about that ? -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy

Re: [Numpy-discussion] Owndata flag

2011-12-16 Thread Fabrice Silva
(pointer_to_Cobj, some_destructor)) Seems OK. Any objections about that ? This is ok, but CObject is deprecated as of Python 3.1, so it's not portable to Python 3.2. My guess is then that the PyCapsule object is the way to go... -- Fabrice Silva

[Numpy-discussion] Owndata flag

2011-12-15 Thread Fabrice Silva
the memory holding array, but I wish the numpy.ndarray becomes the owner of the data. How can do I do such thing ? -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] dtype and pep3118

2011-11-23 Thread Fabrice Silva
strings like T{d:t11: d:t22: d:t33: d:t23: d:t13: d:t12:}:Tensor2d: d:t11: d:t22: d:t33: d:t23: d:t13: d:t12: without success -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] dtype and pep3118

2011-11-23 Thread Fabrice Silva
:}' np.array(memoryview(x)) array([(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)], dtype=[('t11', 'f8'), ('t22', 'f8'), ('t33', 'f8'), ('t23', 'f8'), ('t13', 'f8'), ('t12', 'f8')]) Thanks! -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] yet another indexing question

2011-10-14 Thread Fabrice Silva
/generated/numpy.choose.html -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Fabrice Silva
with fft was much slower than lfilter in my short experimentation with it. About speed comparison between lfilter, convolve, etc... http://www.scipy.org/Cookbook/ApplyFIRFilter -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] help translating matlab to numpy

2011-08-14 Thread Fabrice Silva
Le dimanche 14 août 2011 à 12:43 -0500, a...@ajackson.org a écrit : I'm translating some code from Matlab to numpy, and struggling a bit since I have very little knowledge of Matlab. My question is this - the arg function in Matlab (which seems to be deprecated, they don't show it in their

Re: [Numpy-discussion] Fill a particular value in the place of number satisfying certain condition by another number in an array.

2011-08-01 Thread Fabrice Silva
', command but I failed. Does np.clip fulfill your requirements ? http://docs.scipy.org/doc/numpy/reference/generated/numpy.clip.html Be aware that it needs an upper limit (which can be np.inf). Another option A[A0] = 0. -- Fabrice Silva ___ NumPy

Re: [Numpy-discussion] get a dtypes' range?

2011-06-17 Thread Fabrice Silva
/routines.dtype.html#data-type-information -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [ANN]: OpenPiv. A python package for PIV image analysis

2011-04-25 Thread Fabrice Silva
be possible to change the ctype dependance to cython... Best regards [1] http://www.lavision.de/en/products/davis.php [2] http://www.fast.u-psud.fr/pivmat/ -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] How to import input data to make ndarray for batch processing?

2010-11-18 Thread Fabrice Silva
with adapted range of indices (see xrange doc), string formatting (see string doc) and arguments to loader function -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] portable doctests despite floating points numbers

2010-10-26 Thread Fabrice Silva
Another solution http://code.activestate.com/recipes/577124-approximately-equal/ -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] polynomial fromroots

2010-10-10 Thread Fabrice Silva
) is then a decaying (stable) function of time z outside the unit circle lead them to unstable function. That's why you should prefer roots of the roots of z**(-1) polynomial inside unit circle. -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] Array concatenation performance

2010-07-15 Thread Fabrice Silva
Le jeudi 15 juillet 2010 à 16:05 +0100, John Porter a écrit : You're right - I screwed up the timing for the one that works... It does seem to be faster. I've always just built arrays using nx.array([]) in the past though and was surprised that it performs so badly. Can anyone provide an

Re: [Numpy-discussion] Another reality check

2010-07-12 Thread Fabrice Silva
Le lundi 12 juillet 2010 à 18:14 +1000, Jochen Schröder a écrit : On 07/12/2010 12:36 PM, David Goldsmith wrote: On Sun, Jul 11, 2010 at 6:18 PM, David Goldsmith d.l.goldsm...@gmail.com mailto:d.l.goldsm...@gmail.com wrote: In numpy.fft we find the following: Then A[1:n/2]

Re: [Numpy-discussion] Nyquist frequency in numpy.fft docstring

2010-07-11 Thread Fabrice Silva
Le dimanche 11 juillet 2010 à 16:13 -0700, David Goldsmith a écrit : Hi! I'm a little confused: in the docstring for numpy.fft we find the following: For an even number of input points, A[n/2] represents both positive and negative Nyquist frequency... but according to

Re: [Numpy-discussion] OT? Distutils extension with shared libs

2010-07-07 Thread Fabrice Silva
Thanks for your answers. Three solutions: - ask your users to build the software and install zlib by themselves. On windows, I am afraid it means you concretely limit your userbase to practically 0. - build zlib as part of the build process, and keep zlib internally. - include a copy of

[Numpy-discussion] OT? Distutils extension with shared libs

2010-07-06 Thread Fabrice Silva
I know it is not directly related to numpy (even if it uses numpy.distutils), but I ask you folks how do you deal with code depending on other libs. In libIM7 projet ( https://launchpad.net/libim7 ), I wrap code from a device constructor with ctypes in order to read Particle Image Velocimetry

[Numpy-discussion] Numpy, swig and docstring

2010-06-13 Thread Fabrice Silva
Hi folks, I am trying to wrap a library with swig, distutils and numpy, and am facing troubles. In fact, swig documentation mention that it is possible to mention a module docsstring in the %module directive : %module(docstring=This is the example module's docstring) example where example is

Re: [Numpy-discussion] Some help on matlab to numpy translation

2010-03-13 Thread Fabrice Silva
, that would help me a lot... As ux 's shape is (1,lx,ly), ux(:,1,col) is equal to ux(1,1,col) which is a vector with the elements [ux(1,1,2), ... ux(1,1,ly-1)]. Using : juste after the reshape seems a lit bit silly... -- Fabrice Silva LMA UPR CNRS 7051

Re: [Numpy-discussion] Some help on matlab to numpy translation

2010-03-13 Thread Fabrice Silva
matlab language as visible in the symbols used for indexing ( () and not [] )... :) -- Fabrice Silva LMA UPR CNRS 7051 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] f2py: variable number of arguments of variable lengths

2010-02-17 Thread Fabrice Silva
(dimension np) containing the concatenated arrays. Does anyone have an alternative to this suggestion ? any tip or example? Regards -- Fabrice Silva LMA UPR CNRS 7051 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman

Re: [Numpy-discussion] f2py: variable number of arguments of variable lengths

2010-02-17 Thread Fabrice Silva
Le mercredi 17 février 2010 à 15:43 -0600, Robert Kern a écrit : On Wed, Feb 17, 2010 at 15:29, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: I previously coded a fortran function that needs a variable number of scalar arguments. This number is not known at compile time, but at call time. So I

Re: [Numpy-discussion] f2py: variable number of arguments of variable lengths

2010-02-17 Thread Fabrice Silva
-array (dimension nm) containing the number of rows in each array - np: the sum of array sizes [(ncols * nrows).sum() in numpy terms] - X : a 1d-array (dimension np) containing the concatenated arrays. I guess I will need to be careful when building the arrays from X. Thanks! -- Fabrice Silva

Re: [Numpy-discussion] boolean arrays

2009-11-26 Thread Fabrice Silva
Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh a écrit : It is obvious to me that True+False == True,. Why do you think it should be False? I would understand it is not obvious that '+' stands for logical 'or', and '*' for logical 'and'... -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA

Re: [Numpy-discussion] boolean arrays

2009-11-26 Thread Fabrice Silva
Le jeudi 26 novembre 2009 à 14:44 +0100, Gael Varoquaux a écrit : On Thu, Nov 26, 2009 at 02:43:14PM +0100, Fabrice Silva wrote: Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh a écrit : It is obvious to me that True+False == True,. Why do you think it should be False? I would

Re: [Numpy-discussion] The problem with zero dimesnsional array

2009-09-29 Thread Fabrice Silva
the array or replace areavalue by areavalue[0] in your snipplet. -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 PS : you need not to personally email your request. I saw your message on the mailing list, but I had no time to answer... ___ NumPy

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread Fabrice Silva
yet? print the values within the loop : print (R_amp, R_time) to check your values. You may also inspect your graphs to see how many lines they have : plt.gca().get_children() or plt.gca().get_lines() might help -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread Fabrice Silva
) -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-08 Thread Fabrice Silva
Le lundi 06 juillet 2009 à 17:57 +0200, Fabrice Silva a écrit : Le lundi 06 juillet 2009 à 17:13 +0200, Nils Wagner a écrit : IIRC, the coefficients of your polynomial are complex. So, you cannot guarantee that the roots are complex conjugate pairs. Correct! If the construction is done

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
), and real parts become positive... The computation of the coefficients of the polynomial is out of topic, I already checked it and there is no errors. -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier, 13402 Marseille, France

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
efficient for a low value of N (10)... -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier, 13402 Marseille, France. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
to be complex. But if their processing is done simultaneously, the combination gives real coefficients. Let me modify this point and come back to tell you if it is the breakpoint... -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier, 13402 Marseille, France

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
Le lundi 06 juillet 2009 à 17:57 +0200, Fabrice Silva a écrit : Le lundi 06 juillet 2009 à 17:13 +0200, Nils Wagner a écrit : IIRC, the coefficients of your polynomial are complex. So, you cannot guarantee that the roots are complex conjugate pairs. Correct! If the construction is done

[Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
into the source and I wondered that roots is based on the eigenvalues of the companion matrix. For high-order, this latter is rather sparse. Would it improve anything to compute the eigenvalues using sparse solvers? -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
of the eigenvalues are rather close to one. Does it help ? Looking in the debian repository, I found python-gmpy, an interface GMP to Python. But how could it be used to compute the eigenvalues of the companion matrix ? I will look in the doc... -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
+173 +6.83930275e+156j 6.95713759e+170 -3.36080695e+154j -1.36763548e+169 -4.25101484e+151j 2.31484033e+166 +2.65804116e+149j -1.19894847e+164 +1.50542119e+146j] -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 ___ Numpy-discussion

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Fabrice Silva
... -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-20 Thread Fabrice Silva
On Thu, Feb 19, 2009 at 17:03, Frank Peacock fr...@gis4weather.com wrote: img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) Le jeudi 19 février 2009 à 18:24 -0600, Robert Kern a écrit : for i in range(3): img[ngridn,ngride,i] = ncolour[i] Is it not possible to simply use

Re: [Numpy-discussion] trouble subclassing ndarray

2008-12-03 Thread Fabrice Silva
of the Homogeneous Matrix with the coefficient of htr.inv(self) -- Fabrice Silva [EMAIL PROTECTED] LMA UPR CNRS 7051 - équipe S2M ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] error importing a f2py compiled module.

2008-11-30 Thread Fabrice Silva
Le dimanche 30 novembre 2008 à 14:47 +0900, David Cournapeau a écrit : Fabrice Silva wrote: A way of solving this issue was to move the shared object file to another directory. But I want to figure out what is happening exactly. Googling a lot indicates that selinux would be the cause

Re: [Numpy-discussion] 2D phase unwrapping

2008-11-29 Thread Fabrice Silva
licensing issues. I also may be able to devote some programming resources to helping out, if someone else volunteers to do the majority of the work. So what is expected now ? What have to be done in order to include it in scipy ? -- Fabrice Silva

Re: [Numpy-discussion] error importing a f2py compiled module.

2008-11-29 Thread Fabrice Silva
Hi all, I am facing this old problem again : Fabrice Silva a écrit : Dear all I've tried to run f2py on a fortran file which used to be usable from python some months ago. Following command line are applied with success (no errors raised) : f2py -m modulename -c --f90exec=gnu95

Re: [Numpy-discussion] 2D phase unwrapping

2008-11-29 Thread Fabrice Silva
less time than writing a binding to GERI code. -- Fabrice Silva [EMAIL PROTECTED] LMA UPR CNRS 7051 - équipe S2M ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] 2D phase unwrapping

2008-11-26 Thread Fabrice Silva
: unwrapping along the vertical axis and then unwrapping the first line and applying the 2pi gaps to all lines... - tmp20.png : unwrapping along the horizontal axis -- Fabrice Silva ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Fabrice Silva
Le mercredi 19 novembre 2008 à 14:27 -0500, Alan G Isaac a écrit : So my question is not just what is the algorithm but also, what is the documentation goal? Concerning the algorithm (only): in Joshua answer, you have might have seen that solve is a wrapper to lapack routines *gesv (z* or d*

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread Fabrice Silva
the existent code. Why not creating a new function hessian() having the same signature than gradient? -- Fabrice Silva ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] efficient way to do this?

2008-09-22 Thread Fabrice Silva
more like y = np.sin(2*np.pi*np.linspace(0, 2, N)) ind = np.nonzero(y0.95)[0] marked2 = np.zeros(N, bool) for i in ind: marked2[i:i+Nmark] = True I do not understand what you do expect here to code... -- Fabrice Silva [EMAIL PROTECTED] LMA UPR CNRS 7051

Re: [Numpy-discussion] error importing a f2py compiled module.

2008-07-14 Thread Fabrice Silva
Le lundi 23 juin 2008 à 14:10 +0200, Fabrice Silva a écrit : I don't have ideas what is causing this import error. Try the instructions above, may be it is due to some compile object conflicts. The only posts on mailing lists I've read mention security policies (SElinux) and /tmp

Re: [Numpy-discussion] multiply array

2008-04-10 Thread Fabrice Silva
directly. -- Fabrice Silva, PhD student LMA UPR CNRS 7051 - équipe S2M ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] [f2py] Troubles building a module

2008-02-09 Thread Fabrice Silva
Reading the tutorial http://scipy.org/Cookbook/Theoretical_Ecology/Hastings_and_Powell I've tried to run the provided code. But compiling the fortran module with the line command given in the tuto, I've got the following traceback (you can see it with syntax highlighting at