File
Blob: src/workerd/server/tests/python/vendor_pkg_tests/scipy.py
| 1 | import numpy as np |
| 2 | from scipy import linalg |
| 3 | from workers import WorkerEntrypoint |
| 4 | |
| 5 | |
| 6 | class Default(WorkerEntrypoint): |
| 7 | async def test(self): |
| 8 | c = np.array([1, 3, 6, 10]) |
| 9 | r = np.array([1, -1, -2, -3]) |
| 10 | b = np.array([1, 2, 2, 5]) |
| 11 | res = linalg.solve_toeplitz((c, r), b) |
| 12 | assert ( |
| 13 | repr(res) == "array([ 1.66666667, -1. , -2.66666667, 2.33333333])" |
| 14 | ) |