[SciPy-dev] -Qnew option breaks scipy

Eric Nodwell nodwell at physics.ubc.ca
Sun Apr 30 13:10:57 CDT 2006


Using the -Qnew switch with python breaks scipy (version 0.4.8 and
previous versions I have tested).

The lines below demonstrate this.  In summary, I run:
(1) python without -Q option, and without "from __future__ import
division".  This works.
(2) python without -Q option, and with "from __future__ import
division".  This works.
(2) python with the -Qnew option, and without "from __future__ import
division".  This breaks scipy.


$ /sw/bin/python
Python 2.4.2 (#1, Mar  5 2006, 22:35:36)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 3/2   # verify old style division
1
>>> import scipy
>>> scipy.version.version
'0.4.8'
>>>
$ /sw/bin/python
Python 2.4.2 (#1, Mar  5 2006, 22:35:36)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import division
>>> 3/2    # verify new style division
1.5
>>> import scipy
>>>
$ /sw/bin/python -Qnew
Python 2.4.2 (#1, Mar  5 2006, 22:35:36)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 3/2    # verify new style division
1.5
>>> import scipy
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/sw/lib/python2.4/site-packages/scipy/__init__.py", line 32, in ?
    from numpy import *
  File "/sw/lib/python2.4/site-packages/numpy/f2py/__init__.py", line 12, in ?
    import f2py2e
  File "/sw/lib/python2.4/site-packages/numpy/f2py/f2py2e.py", line 27, in ?
    import rules
  File "/sw/lib/python2.4/site-packages/numpy/f2py/rules.py", line 96, in ?
    module_rules={
  File "/sw/lib/python2.4/site-packages/numpy/f2py/auxfuncs.py", line
395, in gentitle
    return '/*%s %s %s*/'%(l*'*',name,l*'*')
TypeError: can't multiply sequence by non-int
>>>




More information about the Scipy-dev mailing list