It seems as if I have to import scipy optimize explicitly to get it. An example: If I do
import scipy as sp
sp.optimize.somefunction()
I get an AttributeError
.
But if I do
import scipy as sp
from scipy import optimize
sp.optimize.somefunction()
Everything works fine.
Is this desired behaviour? How do I enforce python to load the whole namespace of scipy by doing import scipy as sp
?