8000 Bad results of SVD on some (non-contiguous?) arrays (Trac #178) · Issue #776 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Bad results of SVD on some (non-contiguous?) arrays (Trac #178) #776
@numpy-gitbot

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/178 on 2006-07-13 by @bthyreau, assigned to unknown.

Hi, The svd functions may return fully wrong values on the svn trunk (Here: 0.9.9.2800).
It worked with 0.9.8, still.
Short script to trigger the problem:

from numpy import *
from numpy.linalg import svd
from numpy.random import rand
K = rand(10003 * 2).reshape(10003, 2).astype(float32)
K3 = K[:,0:1]
r1 = svd(K3.copy(), 0)[0]
r2 = svd(K3, 0)[0]
(r1 == r2).all()

The last line should return True, but returns False presently. Note that strangely enough, it starts failing for me at sizes of about 10010. Thanks