tests/integration/quick_check_numpy.py
raw| 1 | # Sample numpy program that requires some BLAS and LAPACK routines to work |
| 2 | # properly |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | import numpy as np |
| 6 | |
| 7 | rng = np.random.RandomState(0) |
| 8 | X = rng.randn(500, 200) |
| 9 | XTX = np.dot(X.T, X) |
| 10 | U, S, VT = np.linalg.svd(XTX) |
| 11 | if all(S > 0): |
| 12 | print("ok") |
| 13 | else: |
| 14 | print("[ERROR] invalid singular values:", S) |