[Numpy-tickets] [NumPy] #649: numpy.linalg.lstsq segfaults on i686 32-bit and ia64 linux
NumPy
numpy-tickets@scipy....
Wed Jan 23 20:42:11 CST 2008
#649: numpy.linalg.lstsq segfaults on i686 32-bit and ia64 linux
------------------------+---------------------------------------------------
Reporter: psederberg | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.0.5
Component: Other | Version: none
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by psederberg):
I didn't see that I could format the code. Here it is in nicer format:
{{{
import numpy as N
# set dimensions
nsamples = 53
nfeatures = 1000
# create random data
data = N.random.rand(nsamples,nfeatures)
lab = N.random.rand(nsamples)
# run a ridge regression with constant term
Lambda = .05*nfeatures*N.eye(nfeatures)
a = N.concatenate( \
(N.concatenate((data, N.ones((nsamples, 1))), 1),
N.concatenate((Lambda, N.zeros((nfeatures, 1))), 1)))
b = N.concatenate((lab, N.zeros(nfeatures)))
w = N.linalg.lstsq(a,b)[0]
}}}
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/649#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list