Skip to content

Commit 1ac5f2a

Browse files
author
Fayvel Victor
committed
Remove unused numeric and numarray references
1 parent 783f5c6 commit 1ac5f2a

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

src/m64py/SDL/array.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ def _import_arrays(array_names, locals):
3232
locals['_have_%s' % array_name] = False
3333
locals['_have_array'] = default_array is not None
3434

35-
# This sets up local names for the arrays. If numpy, Numeric, and numarray
36-
# are all available, the following local variables are defined:
35+
# This sets up local names for the arrays. If numpy is
36+
# available, the following local variables are defined:
3737
# numpy, _numpy_typemap
38-
# numarray, _numarray_typemap
39-
# Numeric, _Numeric_typemap
4038
#
4139
# The following local variables will be set to True or False:
42-
# _have_numpy, _have_numarray, _have_Numeric
40+
# _have_numpy
4341
#
4442
# If any of the array modules were imported, the following is True:
4543
# _have_array
@@ -147,7 +145,7 @@ def as_numpy(self, shape=None):
147145
ar = ar.reshape(shape)
148146
return ar
149147

150-
# Generic array methods (numpy, Numeric, numarray)
148+
# Generic array methods (numpy)
151149

152150
def have_array(cls):
153151
'''Determine if an array module is available.
@@ -161,7 +159,7 @@ def array_module(cls):
161159
'''Determine the default array module.
162160
163161
:rtype: module
164-
:return: one of numpy, Numeric, numarray, or None
162+
:return: one of numpy or None
165163
'''
166164
if _have_array:
167165
return _default_array
@@ -170,16 +168,16 @@ def array_module(cls):
170168
array_module = classmethod(array_module)
171169

172170
def to_array(self, shape=None):
173-
'''Convert the array to a numpy, Numeric or numarray array.
171+
'''Convert the array to a numpy array.
174172
175173
The returned array will be a copy of the data. You can retrieve
176-
the module used (numpy, Numeric or numarray) using the `array_module`
174+
the module used (numpy) using the `array_module`
177175
method.
178176
179-
If none of numpy, Numeric or numarray could be imported, an
177+
If none of numpy could be imported, an
180178
ImportError will be raised.
181179
182-
:rtype: numpy.ndarray, Numeric.array or numarray.numarraycore.NumArray
180+
:rtype: numpy.ndarray.array
183181
'''
184182
if not _have_array:
185183
raise ImportError, 'no array module could be imported'
@@ -195,19 +193,15 @@ def to_array(self, shape=None):
195193
# Each module has its own shaping interface
196194
if _have_numpy and _default_array is numpy:
197195
return _default_array.fromstring(s, t).reshape(shape)
198-
elif _have_numarray and _default_array is numarray:
199-
return _default_array.fromstring(s, t, shape)
200-
elif _have_Numeric and _default_array is Numeric:
201-
return _default_array.fromstring(s, t).resize(shape)
202196

203197
def from_array(self, array):
204-
'''Copy data from the given numpy, Numeric or numarray array into
198+
'''Copy data from the given numpy array into
205199
this array.
206200
207201
The array sizes must match exactly. No type checking is performed.
208202
209203
:Parameters:
210-
`array` : numpy, Numeric or numarray array object
204+
`array` : numpy array object
211205
Array to copy.
212206
'''
213207
s = array.tostring()

0 commit comments

Comments
 (0)