Is there a way to use the dot syntax in Jupyter Notebook to call a function that was defined in a different notebook? For example, suppose I have a notebook “test.ipynb” containing a function called square(x)
, and say we’ve imported test.ipynb using
using NBInclude
@nbinclude("test.ipynb")
Now that test.ipynb
is imported, we can call square()
just like a regular function, e.g. square(x)
. But for bookkeeping purposes, I’d like to call square
by referencing the notebook in which it was defined in, e.g. test.square(x)
. Unfortunately I tried this and it didn’t work. Is there a similar way to do this?