Source

hack2 / pypyembed / example.py


from embed import export_function

@export_function
def f(a, b):
    return a + b

@export_function
def returning_numarray(size):
    import numpy
    return numpy.arange(size)

print returning_numarray(100)