MCPcopy
hub / github.com/pyodide/pyodide / test_python2js_numpy_scalar

Function test_python2js_numpy_scalar

packages/numpy/test_numpy.py:146–174  ·  view source on GitHub ↗
(selenium, dtype)

Source from the content-addressed store, hash-verified

144 ),
145)
146def test_python2js_numpy_scalar(selenium, dtype):
147 selenium.load_package("numpy")
148 selenium.run("import numpy as np")
149 selenium.run(
150 f"""
151 x = np.{dtype}(1)
152 """
153 )
154 assert (
155 selenium.run_js(
156 """
157 return pyodide.globals.get('x') == 1
158 """
159 )
160 is True
161 )
162 selenium.run(
163 """
164 x = x.byteswap().view(x.dtype.newbyteorder())
165 """
166 )
167 assert (
168 selenium.run_js(
169 """
170 return pyodide.globals.get('x') == 1
171 """
172 )
173 is True
174 )
175
176
177@pytest.mark.skip_pyproxy_check

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…