This works:
from scipy import stats
def initialize(context):
...
However this gives an error:
def initialize(context):
from scipy import stats
"ImportError: cannot import name stats"
Why does the import only work in the global scope? If this is not a bug why do you disallow local imports?