To get a feel for NumPy's source code I want to start by adding my own dummy custom function. I've followed their docs to set up a developing environment and have done an inplace build of NumPy as advised ($ python setup.py build_ext -i; export PYTHONPATH=$PWD).
Now I want to add this function:
def multiplybytwo(x):
"""
Return the double of the input
"""
y = x*2
return y
But I do not know where to place it so that this code would run properly:
import numpy as np
a = np.array([10])
b = np.mulitplybytwo(a)