I am trying to understand the syntax logic of Python all about imports. Take for example the function scipy.signal.ricker
. The function should not matter.
To use this function of Python (without any imports at all) I have to
import scipy
and then I can use it via
scipy.signal.ricker(...)
Alternatively I can
from scipy import signal
and use it via
signal.ricker(...)
Is there any option to import ricker
directly so that I just had to write ricker(...)
and how would I import something else if it would be nested one, two or 10 levels further?