On Tue, Oct 28, 2014 at 2:48 AM, Yuxiang Wang <yw5aj@virginia.edu> wrote:
(Sorry about sending this to the wrong list, scipy-user instead of
scipy-dev, before; apologize to those who saw this twice)

Hi all,

I was reading through the link
(http://docs.scipy.org/doc/scipy/reference/api.html#guidelines-for-importing-functions-from-scipy)
and it mentioned that the first form is
preferred over the second one under most circumstances:

# first form
from scipy import stats
stats.lomax(...)

# second form
from scipy.stats import distributions
distributions.lomax(...)

I honestly think the second form is far more frequently used in the
examples given in the document, for example:

http://docs.scipy.org/doc/scipy/reference/tutorial/special.html
http://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html
http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html
http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html
http://docs.scipy.org/doc/scipy/reference/tutorial/fftpack.html

Would you think it'd be better to update this link?

Hi Shawn, sorry for the slow reply. I think what happened here is that we've settled on the first form after part of the documentation was written, and no one has bothered to go through every example in scipy (that would be quite a bit of work...) to make everything consistent. Personally I prefer the first form.

Cheers,
Ralf

 

-Shawn
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev