summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/matrix.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-18 18:40:28 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-09-23 15:11:12 -0600
commit3beebbc0164afbbcc2b6840cf56174c6c073bb40 (patch)
tree5eece25d48cd246d78a94e3fcda8c565b6d78258 /numpy/oldnumeric/matrix.py
parent2a1705f4932f446c67074e46bd5fa9098920122d (diff)
downloadnumpy-3beebbc0164afbbcc2b6840cf56174c6c073bb40.tar.gz
DEP: Remove deprecated modules numarray and oldnumeric.
They were deprecated in 1.8 and scheduled for removal in 1.9. Closes #3637.
Diffstat (limited to 'numpy/oldnumeric/matrix.py')
-rw-r--r--numpy/oldnumeric/matrix.py70
1 files changed, 0 insertions, 70 deletions
diff --git a/numpy/oldnumeric/matrix.py b/numpy/oldnumeric/matrix.py
deleted file mode 100644
index 35c795e9d..000000000
--- a/numpy/oldnumeric/matrix.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""This module is for compatibility only.
-
-"""
-from __future__ import division, absolute_import, print_function
-
-__all__ = ['UserArray', 'squeeze', 'Matrix', 'asarray', 'dot', 'k', 'Numeric', 'LinearAlgebra', 'identity', 'multiply', 'types', 'string']
-
-import types
-from .user_array import UserArray, asarray
-import numpy.oldnumeric as Numeric
-from numpy.oldnumeric import dot, identity, multiply
-import numpy.oldnumeric.linear_algebra as LinearAlgebra
-from numpy import matrix as Matrix, squeeze
-
-# Hidden names that will be the same.
-
-_table = [None]*256
-for k in range(256):
- _table[k] = chr(k)
-_table = ''.join(_table)
-
-_numchars = '0123456789.-+jeEL'
-_todelete = []
-for k in _table:
- if k not in _numchars:
- _todelete.append(k)
-_todelete = ''.join(_todelete)
-
-
-def _eval(astr):
- return eval(astr.translate(_table, _todelete))
-
-def _convert_from_string(data):
- data.find
- rows = data.split(';')
- newdata = []
- count = 0
- for row in rows:
- trow = row.split(',')
- newrow = []
- for col in trow:
- temp = col.split()
- newrow.extend(map(_eval, temp))
- if count == 0:
- Ncols = len(newrow)
- elif len(newrow) != Ncols:
- raise ValueError("Rows not the same size.")
- count += 1
- newdata.append(newrow)
- return newdata
-
-
-_lkup = {'0':'000',
- '1':'001',
- '2':'010',
- '3':'011',
- '4':'100',
- '5':'101',
- '6':'110',
- '7':'111'}
-
-def _binary(num):
- ostr = oct(num)
- bin = ''
- for ch in ostr[1:]:
- bin += _lkup[ch]
- ind = 0
- while bin[ind] == '0':
- ind += 1
- return bin[ind:]