Importar funciones desde otro cuaderno jupyter
Estoy tratando de importar una función desde otro cuaderno jupyter
In n1.ipynb:
def test_func(x):
return x + 1
-> run this
In n2.ipynb:
%%capture
%%run n1.ipynb
test_func(2)
Error
NameError Traceback (most recent call last)<ipython-input-2-4255cde9aae3> in <module>()
----> 1 test_func(1)
NameError: name 'test_func' is not defined
¿Alguna forma fácil de hacer esto, por favor?