[SciPy-Dev] Help with PR 8681: import
Christoph Baumgarten
christoph.baumgarten at gmail.com
Sat Jun 2 03:33:21 EDT 2018
Hi,
I would like to ask for help with PR 8681.
I want to use the function rvs_ratio_unif from stats/stats.py to generate
random variates in stats/_continuous_distributions.py
In_continuous_distributions.py, I use "from . import stats" which does not
work with 2.7 and 3.4, I assume it is a circular reference from the error
message below:
___________ ERROR collecting scipy/signal/tests/test_array_tools.py
____________
ImportError while importing test module
'/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/signal/tests/test_array_tools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/signal/__init__.py:329:
in <module>
from ._peak_finding import *
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/signal/_peak_finding.py:11:
in <module>
from scipy.stats import scoreatpercentile
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/stats/__init__.py:348:
in <module>
from .stats import *
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/stats/stats.py:175:
in <module>
from . import distributions
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/stats/distributions.py:13:
in <module>
from . import _continuous_distns
/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/scipy/stats/_continuous_distns.py:18:
in <module>
from . import stats
E ImportError: cannot import name 'stats'
Thanks
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180602/5302e664/attachment.html>
More information about the SciPy-Dev
mailing list