Skip to content
File

Blob: src/workerd/server/tests/python/vendor_pkg_tests/scipy.py

python15 lines
1import numpy as np
2from scipy import linalg
3from workers import WorkerEntrypoint
4 
5 
6class 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 )