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
> (ana
Le mercredi 20 février 2013 à 13:35 +, Robert Kern a écrit :
> On Wed, Feb 20, 2013 at 1:25 PM, Neal Becker 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,
> > 0.70710678-0.
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 mentione
often thought that
scipy.ode could use some 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-Dis
g the ODEPACK.
https://github.com/FabricioS/scipy/commit/f867f2b8133d3f6ea47d449bd760a77a7c90394e
--
Fabrice Silva
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Le mardi 14 août 2012 à 21:21 +0200, Ralf Gommers a écrit :
> On Sun, Aug 12, 2012, Fabrice Silva 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 way
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
convert complex to float
In [6]: a[0] = b[0]
Other workarounds : asscalar and squeeze
In [7]: a[0] = np.asscalar(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
Le jeudi 17 mai 2012 à 11:16 +0200, Ralf Gommers a écrit :
> On Thu, May 17, 2012 at 10:48 AM, Fabrice Silva wrote:
>
> > Nautilus and file-roller are *** on me...
> > I hope this one is good.
> > Thanks for being patient :)
> >
>
> That was the right tar f
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
s
> fine, so it may 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
___
Nu
ntition
assert a.b.is_mycls(obj)
AssertionError
[coverage results]
Ran 1 test in 0.006s
FAILED (failures=1)
--
Fabrice Silva
LMA UPR CNRS 7051
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
ject
against b.mycls
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
> numpy.set_array_base(my_ndarray, PyCObject_FromVoidPtr(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 gues
lified-creation-of-numpy-arrays-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-Discu
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
Le mercredi 23 novembre 2011 à 15:52 +0100, Pauli Virtanen a écrit :
>
> >>> dtype = [('t11', '|f8'), ('t22', '|f8'), ('t33', '|f8'),
> ... ('t23', '|f8'), ('t13', '|f8'), ('t12', '|f8')]
> >>> x = np.zeros([1], dtype=dtype)
> >>> memoryview(x).format
> 'T{d:t11:d:t22:d:t33:d:t23:d:t13:d:
7;|f8'), ('t12', '|f8')]
so that I can manipulate a structured array and its fields ?
I tried 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
_
__array_prepare__ would be the good starting point to
impose the 'F'-ordered array and atleast_3d, but the point is that I
don't know at that time if the ufunc will transform the datatype (from
vector to scalar, from int to float, etc...)
Some thought?
Regards
--
t;
> Except, I think it's possible to do it with fft, if you want to
> fft-inverse-convolve (?)
> But simulating an ARMA 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
e than two lines for
u), then np.choose may be more appropriate
http://docs.scipy.org/doc/numpy/reference/generated/numpy.choose.html
--
Fabrice Silva
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
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
27;. I used 'masked_where', 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[A<0] = 0.
--
Fabrice Silva
___
e generic fashion.
http://docs.scipy.org/doc/numpy/reference/routines.dtype.html#data-type-information
--
Fabrice Silva
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
py if you consider useful this tool within OpenPIV. It
would also 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-D
data = numpy.loadtxt(filename, ... )
#... your processing on single file
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
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
Le vendredi 15 octobre 2010, Sébastien Barthélemy a écrit :
> Hello all,
Hi Seb
> I use doctest for examples and tests in a program which relies heavily
> on numpy. As floating point calculations differs slightly across
> computers (32/64 bits), I have troubles writing portable doctests.
> The doc
(jwt) 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-Discussio
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 a
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
> > mailto:d.l.goldsm...@gmail.com>> wrote:
> >
> > In numpy.fft we find the following:
> >
> > "Then A[1:n/2] contains the
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 http://en.
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 cop
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 (PIV
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 t
e([1, ly - 1)
You are right about the 0 or 1 based indexing argument, but I was
speaking matlab language as visible in the symbols used for indexing
( () and not [] )... :)
--
Fabrice Silva
LMA UPR CNRS 7051
___
NumPy-Discussion mailing list
Nu
syntax: "ux(:,1,col)" with "col = [2:(ly-1)]". If
> someone knows, 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 ":&qu
when building the arrays from X.
Thanks!
--
Fabrice Silva
LMA UPR CNRS 7051
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Le mercredi 17 février 2010 à 15:43 -0600, Robert Kern a écrit :
> On Wed, Feb 17, 2010 at 15:29, Fabrice Silva 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
> > ti
(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
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 sho
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 'an
a tuple with the array you are
interested in as the first element. If it is such a case, first extract
the array or replace areavalue by areavalue[0] in your snipplet.
--
Fabrice Silva
LMA UPR CNRS 7051
PS : you need not to personally email your request. I saw your message
on the mailing list, bu
..
>>> R_time[i] = t[maxloc]
Same thing with R_amp. After looping, whatever the solution you choose,
you can plot the whole set of (time, value) tuples
>>> plt.plot(R_time, R_amp)
--
Fabrice Silva
LMA UPR CNRS 7051
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
u want to be
displayed aren't 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
>>>
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.
>
> C
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.
>
> C
ear 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 Marseill
ose to 2N.
I do understand this approach might seem non-obvious but it is rather
efficient for a low value of N (<10)...
--
Fabrice Silva
Laboratory of Mechanics and Acoustics - CNRS
31 chemin Joseph Aiguier, 13402 Marseille, France.
___
Numpy-di
tian
symmetry' (complex conjugate solutions), 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 J
e+158j
-2.54119737e+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
LMA UPR CNRS 7051
___
Numpy-discussion mailing list
e values 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
LMA UP
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
gnal.lfilter([A],[1,-B],x)
You may be careful with initial conditions...
--
Fabrice Silva
LMA UPR CNRS 7051
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
> On Thu, Feb 19, 2009 at 17:03, Frank Peacock 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
img[ngridn, ngride,
thods inv_v2
and inv_v3, you 'unref' the previous instance of HomogeneousMatrix and
link the 'self' label to a new instance... In inv_v1, you just modify
the coefficient of the Homogeneous Matrix with the coefficient of
htr.inv(self)
--
Fabrice Silva <[EMAIL PROTECTED]>
LMA
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 indicate
ving a tight schedule too, it seems to me that this task would take
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
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 modulenam
e happy to help resolve any remaining 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 includ
tmp11.png : 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
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* d
is just a reduction of the total length of the file
containing the gradient and gradient2 functions, I do not understand why
modifying the existent code. Why not creating a new function hessian()
having the same signature than gradient?
--
Fabrice Silva
ighbors. Eg, the real case looks more like
>
> y = np.sin(2*np.pi*np.linspace(0, 2, N))
>
> ind = np.nonzero(y>0.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...
Calling X such a matrix:
X = numpy.matrix(numpy.diag(x, k=0))
it seems that computing matrix multiplication A*X*B produces the
requirements, doesn't it?
--
Fabrice Silva
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>> x.nanmin()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'numpy.ndarray' object has no attribute 'nanmin'
--
Fabrice Silva
LMA UPR CNRS 7051 - équipe S2M
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
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 securit
compiles as before, but I still can not import the module in python.
> 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
port modulename as Modele
ImportError: modulename.so: failed to map segment from shared
object: Operation not permitted
How can that be fixed ? Any suggestion ?
Thanks
--
Fabrice Silva
LMA UPR CNRS 7051 - équipe S2M
___
Numpy-discussion mailing list
N
sion of the
2darray match, you can multiply them 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
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 http://paste.debian.net
meric, but nothing in
> numpy itself.
if X is a numpy object:
numpy.finfo(type(X)).eps gives the epsilon of the type of X.
You may look at other attributes of finfo too..
--
Fabrice Silva <[EMAIL PROTECTED]>
LMA UPR CNRS 7051
___
Numpy
72 matches
Mail list logo