(selenium)
| 3 | |
| 4 | |
| 5 | def test_numpy(selenium): |
| 6 | selenium.load_package("numpy") |
| 7 | selenium.run( |
| 8 | """ |
| 9 | import numpy |
| 10 | x = numpy.ones((32, 64)) |
| 11 | """ |
| 12 | ) |
| 13 | selenium.run_js( |
| 14 | """ |
| 15 | let xpy = pyodide.runPython('x'); |
| 16 | self.x = xpy.toJs(); |
| 17 | xpy.destroy(); |
| 18 | """ |
| 19 | ) |
| 20 | assert selenium.run_js("return x.length === 32") |
| 21 | for i in range(32): |
| 22 | assert selenium.run_js(f"return x[{i}].length == 64") |
| 23 | for j in range(64): |
| 24 | assert selenium.run_js(f"return x[{i}][{j}] == 1") |
| 25 | |
| 26 | |
| 27 | def test_typed_arrays(selenium): |
nothing calls this directly
no test coverage detected
searching dependent graphs…