Skip to content

Commit 6adc54e

Browse files
committed
Removal of numerix, stage 2.
The only vestiges are a couple method names, and a validator with a warning to catch numerix keys in matplotlibrc files. svn path=/trunk/matplotlib/; revision=6932
1 parent 830329b commit 6adc54e

File tree

16 files changed

+49
-47
lines changed

16 files changed

+49
-47
lines changed

doc/api/api_changes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ list may help describe what changes may be necessary in your code.
1919

2020
Changes for 0.98.x
2121
==================
22+
* Removed numerix package.
23+
2224
* Added new :func:`matplotlib.image.imsave` and exposed it to the
2325
:mod:`matplotlib.pyplot` interface.
2426

2527
* Remove support for pyExcelerator in exceltools -- use xlwt
26-
instead
28+
instead
2729

2830
* Changed the defaults of acorr and xcorr to use usevlines=True,
2931
maxlags=10 and normed=True since these are the best defaults

doc/devel/outline.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ config/rcparams Darren needs conversion
107107
config/rcsetup Darren needs conversion
108108
config/tconfig Darren needs conversion
109109
config/verbose Darren needs conversion
110-
numerix/__init__ needs conversion
111110
projections/__init__ Mike converted
112111
projections/geo Mike converted (not included--experimental)
113112
projections/polar Mike converted

examples/misc/rc_traits.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ class PatchRC(traits.HasTraits):
131131

132132
class RC(traits.HasTraits):
133133
backend = traits.Trait(*backends)
134-
numerix = traits.Trait('Numeric', 'numarray')
135134
interactive = flexible_false_trait
136135
toolbar = traits.Trait('toolbar2', 'classic', None)
137136
timezone = traits.Trait(*timezones)

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def quote_ps_string(s):
112112

113113
def seq_allequal(seq1, seq2):
114114
"""
115-
seq1 and seq2 are either None or sequences or numerix arrays
115+
seq1 and seq2 are either None or sequences or arrays
116116
Return True if both are None or both are seqs with identical
117117
elements
118118
"""

lib/matplotlib/config/mplconfig.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class MPLConfig(TConfig):
5858
toolbar = T.Trait('toolbar2', 'toolbar2', None)
5959
timezone = T.Trait('UTC', pytz.all_timezones)
6060
datapath = T.Trait(cutils.get_data_path())
61-
numerix = T.Trait('numpy', 'numpy', 'numeric', 'numarray')
6261
units = T.false
6362

6463
class backend(TConfig):
@@ -290,7 +289,6 @@ def __init__(self, tconfig):
290289
self.tconfig_map = {
291290
'backend' : (self.tconfig.backend, 'use'),
292291
'backend_fallback' : (self.tconfig.backend, 'fallback'),
293-
'numerix' : (self.tconfig, 'numerix'),
294292
'toolbar' : (self.tconfig, 'toolbar'),
295293
'datapath' : (self.tconfig, 'datapath'),
296294
'units' : (self.tconfig, 'units'),

lib/matplotlib/config/rcsetup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ def validate_fonttype(s):
7575
'QtAgg', 'Qt4Agg', 'SVG', 'Template', 'TkAgg', 'WX', 'WXAgg',
7676
], ignorecase=True)
7777

78-
validate_numerix = ValidateInStrings('numerix',[
79-
'Numeric','numarray','numpy',
80-
], ignorecase=True)
81-
8278
validate_toolbar = ValidateInStrings('toolbar',[
8379
'None','classic','toolbar2',
8480
], ignorecase=True)
@@ -298,7 +294,6 @@ def __call__(self, s):
298294
# a map from key -> value, converter
299295
defaultParams = {
300296
'backend' : ['WXAgg', validate_backend],
301-
'numerix' : ['numpy', validate_numerix],
302297
'toolbar' : ['toolbar2', validate_toolbar],
303298
'datapath' : [None, validate_path_exists], # handled by _get_data_path_cached
304299
'units' : [False, validate_bool],

lib/matplotlib/rcsetup.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,17 @@ def validate_backend(s):
106106
if s.startswith('module://'): return s
107107
else: return _validate_standard_backends(s)
108108

109-
validate_numerix = ValidateInStrings('numerix',[
110-
'Numeric','numarray','numpy',
111-
], ignorecase=True)
109+
110+
def validate_numerix(v):
111+
# 2009/02/24: start warning; later, remove all traces
112+
try:
113+
if v == 'obsolete':
114+
return v
115+
except ValueError:
116+
pass
117+
warnings.warn('rcParams key "numerix" is obsolete and has no effect;\n'
118+
' please delete it from your matplotlibrc file')
119+
112120

113121
validate_toolbar = ValidateInStrings('toolbar',[
114122
'None','classic','toolbar2',
@@ -323,7 +331,7 @@ def __call__(self, s):
323331
defaultParams = {
324332
'backend' : ['Agg', validate_backend], # agg is certainly present
325333
'backend_fallback' : [True, validate_bool], # agg is certainly present
326-
'numerix' : ['numpy', validate_numerix],
334+
'numerix' : ['obsolete', validate_numerix],
327335
'maskedarray' : ['obsolete', validate_maskedarray], #to be removed
328336
'toolbar' : ['toolbar2', validate_toolbar],
329337
'datapath' : [None, validate_path_exists], # handled by _get_data_path_cached

matplotlibrc.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ backend : %(backend)s
3434
# conflicts, we will automatically try and find a compatible one for
3535
# you if backend_fallback is True
3636
#backend_fallback: True
37-
numerix : %(numerix)s # numpy, Numeric or numarray
3837
#interactive : False
3938
#toolbar : toolbar2 # None | classic | toolbar2
4039
#timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris

setup.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# This dict will be updated as we try to select the best option during
1919
# the build process. However, values in setup.cfg will be used, if
2020
# defined.
21-
rc = {'backend':'Agg', 'numerix':'numpy'}
21+
rc = {'backend':'Agg'}
2222

2323
# BEFORE importing disutils, remove MANIFEST. distutils doesn't properly
2424
# update it when the contents of directories change.
@@ -52,13 +52,6 @@
5252
'matplotlib.projections',
5353
# 'matplotlib.toolkits',
5454
'mpl_toolkits',
55-
'matplotlib.numerix',
56-
'matplotlib.numerix.mlab',
57-
'matplotlib.numerix.ma',
58-
'matplotlib.numerix.npyma',
59-
'matplotlib.numerix.linear_algebra',
60-
'matplotlib.numerix.random_array',
61-
'matplotlib.numerix.fft',
6255
'matplotlib.sphinxext'
6356
]
6457

@@ -224,14 +217,12 @@ def add_dateutil():
224217

225218
# Write the default matplotlibrc file
226219
if options['backend']: rc['backend'] = options['backend']
227-
if options['numerix']: rc['numerix'] = options['numerix']
228220
template = file('matplotlibrc.template').read()
229221
file('lib/matplotlib/mpl-data/matplotlibrc', 'w').write(template%rc)
230222

231223
# Write the default matplotlib.conf file
232224
template = file('lib/matplotlib/mpl-data/matplotlib.conf.template').read()
233225
template = template.replace("datapath = ", "#datapath = ")
234-
template = template.replace("numerix = 'numpy'", "numerix = '%s'"%rc['numerix'])
235226
template = template.replace(" use = 'Agg'", " use = '%s'"%rc['backend'])
236227
file('lib/matplotlib/mpl-data/matplotlib.conf', 'w').write(template)
237228

setupext.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@
106106
'build_macosx': 'auto',
107107
'build_image': True,
108108
'build_windowing': True,
109-
'backend': None,
110-
'numerix': None}
109+
'backend': None}
111110

112111
# Based on the contents of setup.cfg, determine the build options
113112
if os.path.exists("setup.cfg"):
@@ -142,9 +141,6 @@
142141
try: options['backend'] = config.get("rc_options", "backend")
143142
except: pass
144143

145-
try: options['numerix'] = config.get("rc_options", "numerix")
146-
except: pass
147-
148144

149145
if options['display_status']:
150146
def print_line(char='='):

0 commit comments

Comments
 (0)