Author asmeurer
Recipients amak, asmeurer, fwierzbicki
Date 2011-09-28.17:35:02
SpamBayes Score 6.15341e-13
Marked as misclassified No
Message-id <>
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 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

>>> import sympy.physics.quantum.spin
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/external/ 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/", line 46, in <module>
    import represent as repmod
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/", 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/", line 27, in <module>
    from sympy.physics.quantum.spin import (
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/", line 871, in <module>
    Jx = JxOp('J')
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/physics/quantum/", line 120, in __new__
    inst = Expr.__new__(cls, *args, **{'commutative':False})
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/", line 85, in __new__
  File "/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/", 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.
Date User Action Args
2011-09-28 17:35:03asmeurersetmessageid: <>
2011-09-28 17:35:03asmeurersetrecipients: + asmeurer, fwierzbicki, amak
2011-09-28 17:35:03asmeurerlinkissue1777 messages
2011-09-28 17:35:02asmeurercreate