8000 Apply suggestions from code review · matplotlib/matplotlib@39306cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 39306cf

Browse filesBrowse files
timhoffmstory645jklymak
authored
Apply suggestions from code review
Co-authored-by: hannah <story645@gmail.com> Co-authored-by: Jody Klymak <jklymak@gmail.com>
1 parent 21864d1 commit 39306cf

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

lib/matplotlib/pylab.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
"""
2-
`pylab` is a historic interface that is no longer recommended.
2+
`pylab` is a historic interface and its use is now discouraged.
33
4-
Its original purpose was to mimic a MATLAB-like way of working by importing all
5-
functions into the global namespace.
6-
7-
The intended usage pattern was ``from pylab import *``. This imports all functions
8-
from `matplotlib.pyplot`, `numpy`, `numpy.fft`, `numpy.linalg`, `numpy.random`, and
9-
some additional functions into the global namespace.
4+
Its original purpose was to support a MATLAB-like way of working by importing all
5+
functions into the global namespace. The intended usage pattern was ``from pylab
6+
import *``. This imports all the functions from `matplotlib.pyplot`, `numpy`, `numpy.fft`,
7+
`numpy.linalg`, and `numpy.random`, and some additional functions into the global namespace.
108
119
.. warning::
12-
The wildcard import will overwrite some builtin functions (e.g. the builtin `sum`
10+
The wildcard import (`import *`) will overwrite some builtin functions (e.g. the builtin `sum`
1311
will be replaced by `numpy.sum`). This can lead to unexpected behavior.
1412
15-
The use of pylab is strongly discouraged. Use `matplotlib.pyplot` instead.
13+
The use of pylab is strongly discouraged. Use `matplotlib.pyplot` instead. See :ref:` api_interfaces` for more detail.
1614
1715
"""
1816

0 commit comments

Comments
 (0)
0