[Numpy-discussion] Synonym standards

Colin J. Williams cjwilliams43@gmail....
Thu Jul 26 21:31:06 CDT 2012


Sent from my BlackBerry® PlayBook™
www.blackberry.com

------------------------------
*From:* "Benjamin Root" <ben.root@ou.edu>
*To:* "Discussion of Numerical Python" <numpy-discussion@scipy.org>
*Sent:* 26 July 2012 16:57
*Subject:* Re: [Numpy-discussion] Synonym standards


On Thu, Jul 26, 2012 at 4:45 PM, Colin J. Williams <fn681@ncf.ca> wrote:

>  It seems that these standards have been adopted, which is good:
>
> The following import conventions are used throughout the NumPy source and
> documentation:
>
> import numpy as np
> import matplotlib as mpl
> import matplotlib.pyplot as plt
>
> Source: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
>
>  Is there some similar standard for PyLab?
>
> Thanks,
>
> Colin W.
>
>

Colin,

Typically, with pylab mode of matplotlib, you do:

from pylab import *

This is essentially equivalent to:

from numpy import *
from matplotlib.pyplot import *

Note that the pylab "module" is actually a part of matplotlib and is a
shortcut to provide an environment that is very familiar to Matlab users.
Converts are then encouraged to use the imports you mentioned in order to
properly utilize python namespaces.

I hope that helps!
Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120726/28ed5dfa/attachment-0001.html 


More information about the NumPy-Discussion mailing list