[Python-modules-commits] [pyqwt5] 04/05: Remove numpy and numarray from anynumpy
Gudjon I. Gudjonsson
gudjon-guest at moszumanska.debian.org
Thu Aug 18 09:53:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
gudjon-guest pushed a commit to branch master
in repository pyqwt5.
commit e22e7e1ce7b78ef83edd438d91e137aa4ce17807
Author: Gudjon I. Gudjonsson <gudjon at gudjon.org>
Date: Thu Aug 18 11:51:45 2016 +0200
Remove numpy and numarray from anynumpy
---
qt4lib/PyQt4/Qwt5/anynumpy.py | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/qt4lib/PyQt4/Qwt5/anynumpy.py b/qt4lib/PyQt4/Qwt5/anynumpy.py
index 6c1248e..d1b1a84 100644
--- a/qt4lib/PyQt4/Qwt5/anynumpy.py
+++ b/qt4lib/PyQt4/Qwt5/anynumpy.py
@@ -1,18 +1,8 @@
-# import either NumPy, or numarray, or Numeric
+# import NumPy but not numarray, or Numeric anymore
-for name in ('numpy', 'numarray', 'Numeric'):
- failed = False
- try:
- eval(compile('from %s import *' % name, 'eval', 'exec'))
- if name == 'numpy':
- from numpy.oldnumeric.compat import *
- Float = float
- UInt8 = uint8
- except ImportError:
- failed = True
- if not failed:
- break
-else:
+try:
+ eval(compile('from numpy import *', 'eval', 'exec'))
+except ImportError:
import PyQt4.Qt as Qt
if not Qt.QCoreApplication.instance():
a = Qt.QApplication([])
@@ -31,3 +21,4 @@ else:
# Local Variables: ***
# mode: python ***
# End: ***
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyqwt5.git
More information about the Python-modules-commits
mailing list