Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Double precision forced when using Singular Value Decomposition (SVD) #9516

Open
@gul916

Description

@gul916

Hello,

In the attached file, I compared numpy and scipy svd function for types np.float32, np.float64, np.complex64, np.complex128. Surprisingly, under numpy, np.float32 and np.conplex64 times are similar to np.float64 and np.complex128, respectively. However, under scipy, results are doubled as expected when passing from single to double precision.

I suspect numpy to force double precision, while scipy is not, which is the correct result. As SVD is a computing intensive function, using single precision can be crucial to limit computation time.

This has been tested on numpy 1.12.1, either under windows and linux.

Thanking you,
GuL

test_svd_cpu_gul.py.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions