[SciPy-user] newcore module import inconsistency

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 3 09:53:02 CST 2005


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



More information about the SciPy-user mailing list