Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 78e59fd

Browse filesBrowse files
committed
implemented the consensus of restoring the Python builtin min(), max(),
round(), abs(), and sum() functions after a "from pylab import *". - ADS svn path=/trunk/matplotlib/; revision=876
1 parent d9ee67d commit 78e59fd
Copy full SHA for 78e59fd

File tree

Expand file treeCollapse file tree

3 files changed

+21
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+21
-0
lines changed

‎API_CHANGES

Copy file name to clipboardExpand all lines: API_CHANGES
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
API CHANGES in matplotlib-0.70.2
2+
3+
builtin min(), max(), round(), abs(), sum() functions no longer
4+
overridden upon "from pylab import *"
5+
16
API CHANGES in matplotlib-0.70
27

38
MplEvent factored into a base class Event and derived classes
49
MouseEvent and KeyEvent
510

611
Removed definct set_measurement in wx toolbar
12+
713
API CHANGES in matplotlib-0.65.1
814

915
removed add_axes and add_subplot from backend_bases. Use

‎CHANGELOG

Copy file name to clipboardExpand all lines: CHANGELOG
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
New entries should be added at the top
22

3+
2005-01-19 Restored builtin names which were overridden (min, max,
4+
abs, round, and sum) in pylab. This is a potentially significant
5+
change for those who were relying on an array version of those
6+
functions that previously overrode builtin function names. - ADS
7+
38
2005-01-18 Added accents to mathtext: \hat, \breve, \grave, \bar,
49
\acute, \tilde, \vec, \dot, \ddot. All of them have the same
510
syntax, eg to make an overbar you do \bar{o} or to make an o umlaut

‎lib/matplotlib/pylab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pylab.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@
216216

217217
import matplotlib
218218

219+
# Restore builtins which may have been overridden (typically by mlab).
220+
# This was discussed here
221+
# http://sourceforge.net/mailarchive/forum.php?thread_id=6307396&forum_id=33405
222+
import __builtin__
223+
min = __builtin__.min
224+
max = __builtin__.max
225+
sum = __builtin__.sum
226+
round = __builtin__.round
227+
abs = __builtin__.abs
228+
219229
def colors():
220230
"""
221231
This is a do nothing function to provide you with help on how

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.