I moved the package loading code from pyodide.js into a separate file without other changes.
More specifically I changed `let loadScript;` ==> `export let loadScript;` and I added `import { Module } from "./module";` to the top of the file. Also everything got de-indented.
Split off load-pyodide.js from pyodide.js. I moved the package loading code from pyodide.js into a separate file without other changes.
More specifically I changed `let loadScript;` ==> `export let loadScript;` and I added `import { Module } from "./module";` to the top of the file. Also everything got de-indented.
# http://stackoverflow.com/questions/7741878/how-to-apply-numpy-linalg-norm-to-each-row-of-a-matrix/7741976#7741976
# setup: import numpy as np ; N = 1000; x = np.random.rand(N,N)
# run: l2norm(x)

# pythran export l2norm(float64[][])
import numpy as np


def l2norm(x):
    return np.sqrt(np.einsum("ij,ij->i", x, x))

# http://stackoverflow.com/questions/7741878/how-to-apply-numpy-linalg-norm-to-each-row-of-a-matrix/7741976#7741976
# setup: import numpy as np ; N = 1000; x = np.random.rand(N,N)
# run: l2norm(x)

# pythran export l2norm(float64[][])
import numpy as np


def l2norm(x):
    return np.sqrt(np.einsum("ij,ij->i", x, x))
