Message6655

Author asmeurer
Recipients amak, asmeurer, fwierzbicki
Date 2011-09-28.17:35:02
SpamBayes Score 6.15341e-13
Marked as misclassified No
Message-id <1317231303.32.0.593908559744.issue1777@psf.upfronthosting.co.za>
In-reply-to
Content
I don't know how much help this will be to the Jython developers.  Maybe a SymPy developer could gain some insight from it. If you run this from within the isympy script, which is a script that runs "from sympy import *" and defines some default symbols for you to use (sympy.physics is not included in import *), it doesn't generate the Java traceback:


$~/jython2.5.2/jython bin/isympy 
Couldn't locate IPython. Having IPython installed is greatly recommended.
See http://ipython.scipy.org for more details. If you use Debian/Ubuntu,
just install the 'ipython' package and start isympy again.

Reading history: /Users/aaronmeurer/.sympy-history
ValueError: symbol arg must be either single or eval
Python console for SymPy 0.7.1-git (Python 2.5.2-32-bit) (ground types: python)

These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)

Documentation can be found at http://www.sympy.org

>>> import sympy.physics.quantum.spin
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/external/importtools.py:104: UserWarning: Python version is too old to use numpy (2.6 or newer required)
  warnings.warn("Python version is too old to use %s "
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/__init__.py", line 46, in <module>
    import represent as repmod
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/represent.py", line 21, in <module>
    from sympy.physics.quantum.operatorset import operators_to_state, state_to_operators
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/operatorset.py", line 27, in <module>
    from sympy.physics.quantum.spin import (
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/spin.py", line 871, in <module>
    Jx = JxOp('J')
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/qexpr.py", line 120, in __new__
    inst = Expr.__new__(cls, *args, **{'commutative':False})
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/basic.py", line 85, in __new__
    obj._init_assumptions(assumptions)
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/assumptions.py", line 237, in _init_assumptions
    self._assumptions  = self.default_assumptions
ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 2

Another note: my branch should be merged soon, so you should be able to test this against the SymPy git master.
History
Date User Action Args
2011-09-28 17:35:03asmeurersetmessageid: <1317231303.32.0.593908559744.issue1777@psf.upfronthosting.co.za>
2011-09-28 17:35:03asmeurersetrecipients: + asmeurer, fwierzbicki, amak
2011-09-28 17:35:03asmeurerlinkissue1777 messages
2011-09-28 17:35:02asmeurercreate