Hi, I am looking for the Matlab function detrend. Is there such a thing in scipy ? Nils
Travis Oliphant schrieb:
On Tue, 2002-08-13 at 07:48, Nils Wagner wrote:
Hi,
I am looking for the Matlab function detrend. Is there such a thing in scipy ?
Look for it in a few hours in CVS.
-Travis
Travis, Thank you for your prompt reply. I have used the latest CVS. However python setup.py install failed Traceback (most recent call last): File "setup.py", line 34, in ? import scipy_distutils.atlas_info ImportError: Bad magic number in scipy_distutils/atlas_info.pyc For what reason ? Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
On Wed, 14 Aug 2002, Nils Wagner wrote:
However python setup.py install failed
Traceback (most recent call last): File "setup.py", line 34, in ? import scipy_distutils.atlas_info ImportError: Bad magic number in scipy_distutils/atlas_info.pyc
For what reason ?
May be your python version is now different from the last time you build scipy? Anyway, you can remove all .pyc files in scipy tree and try again. HTH, Pearu
Travis Oliphant schrieb:
On Tue, 2002-08-13 at 07:48, Nils Wagner wrote:
Hi,
I am looking for the Matlab function detrend. Is there such a thing in scipy ?
Look for it in a few hours in CVS.
-Travis
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
There seems to be a problem with detrend dgelss:lwork=134 Traceback (most recent call last): File "io.py", line 36, in ? detrend_intyou = signal.detrend(intyou,-1,'linear') File "/usr/local/lib/python2.1/site-packages/scipy/signal/signaltools.py", line 1107, in detrend coef,resids,rank,s = linalg.lstsq(A,newdata[sl]) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/basic.py", line 277, in lstsq overwrite_b = overwrite_b) flapack.error: (lwork>=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs))) failed for 2nd keyword lwork Any idea or suggestion ? Nils
On Wed, 14 Aug 2002, Nils Wagner wrote:
There seems to be a problem with detrend
dgelss:lwork=134 Traceback (most recent call last): File "io.py", line 36, in ? detrend_intyou = signal.detrend(intyou,-1,'linear') File "/usr/local/lib/python2.1/site-packages/scipy/signal/signaltools.py", line 1107, in detrend coef,resids,rank,s = linalg.lstsq(A,newdata[sl]) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/basic.py", line 277, in lstsq overwrite_b = overwrite_b) flapack.error: (lwork>=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs))) failed for 2nd keyword lwork
Any idea or suggestion ?
What is intyou? An array of what type and shape? Also, what lapack are you using? Is scipy.linalg.test(1) succesful? detrend works here:
scipy.signal.detrend(array([1,2,3,4,6,7],'d'),-1,'linear') array([ 0.23809524, 0.00952381, -0.21904762, -0.44761905, 0.32380952, 0.0952381 ])
scipy.signal.detrend([1,2,3,4,6,7],-1,'linear') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/peterson/opt/lib/python2.2/site-packages/scipy/signal/signaltools.py",
Travis, is there any reasons to keep the line #1105 as A = ones((Npts,2),'d') and not A = ones((Npts,2),data.typecode()) ? Or may be data should be set to 'd' from the beginning? Is detrend supposed to work with complex input as well? These questions arised when I used a list of integers as an input to detrend: line 1108, in detrend newdata[sl] = newdata[sl] - dot(A,coef) TypeError: Array can not be safely cast to required type Regards, Pearu
Pearu Peterson schrieb:
On Wed, 14 Aug 2002, Nils Wagner wrote:
There seems to be a problem with detrend
dgelss:lwork=134 Traceback (most recent call last): File "io.py", line 36, in ? detrend_intyou = signal.detrend(intyou,-1,'linear') File "/usr/local/lib/python2.1/site-packages/scipy/signal/signaltools.py", line 1107, in detrend coef,resids,rank,s = linalg.lstsq(A,newdata[sl]) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/basic.py", line 277, in lstsq overwrite_b = overwrite_b) flapack.error: (lwork>=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs))) failed for 2nd keyword lwork
Any idea or suggestion ?
What is intyou?
An array of what type and shape? you = zeros(4096,Float) .... skipped intyou = cumsum(you)*h Also, what lapack are you
using? I am using ATLAS
Is scipy.linalg.test(1) succesful? Yes
detrend works here:
scipy.signal.detrend(array([1,2,3,4,6,7],'d'),-1,'linear') array([ 0.23809524, 0.00952381, -0.21904762, -0.44761905, 0.32380952, 0.0952381 ])
I get the same result.
Travis, is there any reasons to keep the line #1105 as A = ones((Npts,2),'d') and not A = ones((Npts,2),data.typecode()) ? Or may be data should be set to 'd' from the beginning? Is detrend supposed to work with complex input as well?
scipy.signal.detrend([1,2,3,4,6,7],-1,'linear') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/peterson/opt/lib/python2.2/site-packages/scipy/signal/signaltools.py",
These questions arised when I used a list of integers as an input to detrend: line 1108, in detrend newdata[sl] = newdata[sl] - dot(A,coef) TypeError: Array can not be safely cast to required type
Regards, Pearu
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
On Wed, 2002-08-14 at 05:23, Pearu Peterson wrote:
On Wed, 14 Aug 2002, Nils Wagner wrote:
There seems to be a problem with detrend
dgelss:lwork=134 Traceback (most recent call last): File "io.py", line 36, in ? detrend_intyou = signal.detrend(intyou,-1,'linear') File "/usr/local/lib/python2.1/site-packages/scipy/signal/signaltools.py", line 1107, in detrend coef,resids,rank,s = linalg.lstsq(A,newdata[sl]) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/basic.py", line 277, in lstsq overwrite_b = overwrite_b) flapack.error: (lwork>=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs))) failed for 2nd keyword lwork
Any idea or suggestion ?
What is intyou? An array of what type and shape? Also, what lapack are you using? Is scipy.linalg.test(1) succesful?
detrend works here:
scipy.signal.detrend(array([1,2,3,4,6,7],'d'),-1,'linear') array([ 0.23809524, 0.00952381, -0.21904762, -0.44761905, 0.32380952, 0.0952381 ])
Travis, is there any reasons to keep the line #1105 as A = ones((Npts,2),'d') and not A = ones((Npts,2),data.typecode())
I haven't made this to work with any other datatype. It should definitely be done, though. -Travis
participants (3)
-
Nils Wagner
-
Pearu Peterson
-
Travis Oliphant