[SciPy-user] Matlab function detrend
pearu at cens.ioc.ee
Wed Aug 14 06:23:59 CDT 2002
On Wed, 14 Aug 2002, Nils Wagner wrote:
> There seems to be a problem with detrend
> Traceback (most recent call last):
> File "io.py", line 36, in ?
> detrend_intyou = signal.detrend(intyou,-1,'linear')
> 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:
array([ 0.23809524, 0.00952381, -0.21904762, -0.44761905, 0.32380952,
Travis, is there any reasons to keep the line #1105 as
A = ones((Npts,2),'d')
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
Traceback (most recent call last):
File "<stdin>", line 1, in ?
line 1108, in detrend
newdata[sl] = newdata[sl] - dot(A,coef)
TypeError: Array can not be safely cast to required type
More information about the SciPy-user