8000 Wrong result from np.linalg.cholesky on 32-bit win32 in numpy 1.13.3 · Issue #9795 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Wrong result from np.linalg.cholesky on 32-bit win32 in numpy 1.13.3 #9795
Closed
@pv

Description

@pv

The following program produces wrong results for Numpy 1.13.3 for the 32-bit win32 wheel numpy-1.13.3-cp36-none-win32.whl:

import numpy as np
m = np.array([[1, 0.3], [0.3, 1]])
c = np.linalg.cholesky(m)
print(np.__version__, "\n", c)
assert np.allclose(c @ c.T, m)

it prints

1.13.3 
 [[ -2.00000000e+00   0.00000000e+00]
 [ -1.50000000e-01  -9.55902467e-54]]
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    assert np.allclose(c @ c.T, m)
AssertionError

The 64-bit windows wheels appear to be OK.

The result for Numpy 1.13.1 (numpy-1.13.1-cp36-none-win32.whl) is also OK:

1.13.1 
 [[ 1.         0.       ]
 [ 0.3        0.9539392]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0