[SciPy-user] newcore module import inconsistency

Chris Fonnesbeck fonnesbeck at gmail.com
Thu Nov 3 10:06:12 CST 2005


On 11/3/05, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> Chris Fonnesbeck wrote:
>
> >I notice that, under the latest newcore svn build, you cannot import
> >sub-modules as you would expect:
> >
> >from scipy.stats import exponential
> >
> >gives an error. Instead, I need to write:
> >
> >from scipy import stats
> >exponential = stats.exponential
> >
> >
> >
> stats is not part of newcore.
>
> There is an exponential in scipy.basic.random however.
>
> The only issue is that some variables get converted to a higher
> namespace when scipy is imported.    They are always available in their
> package, however.
>
> Thus,
>
> from scipy.basic.random import exponential works
>
> from scipy import random
> exponential = random.exponential
>
> also works
>
> Improvements
>

Sorry, I meant random, not stats.



More information about the SciPy-user mailing list