[SciPy-Dev] Help with PR 8681: import

Robert Kern robert.kern at gmail.com
Sat Jun 2 03:57:19 EDT 2018


On Sat, Jun 2, 2018 at 12:34 AM Christoph Baumgarten <
christoph.baumgarten at gmail.com> wrote:
>
> 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:

Yes. You can't use `scipy.stats.stats` in `scipy.stats._continuous_distns`.
At least, not as a top-level import. You might locally import
`rvs_ratio_unif` inside the method where it is used, with appropriate
comments. Otherwise, you may find another place to define that function
where both modules can import it.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180602/9275aa75/attachment.html>


More information about the SciPy-Dev mailing list