Thanks for reporting this.  It seems you've uncovered two bugs (the
second one is that the error killed the test runner).

I'll see if I can figure out how to fix at least the numpy one for the
release.  Do you know how to fix it?  If so, please send a pull
request.

Aaron Meurer

On Sat, Jun 18, 2011 at 1:03 PM, Ted Horst <[email protected]> wrote:
> I'm a little late to the party, but I just tested 0.7.0 tip and got this
> error (stopped testing):
>
> This is with python 2.5.1, numpy 1.5.0, no scipy, no gmpy on OSX 10.5.8 PPC
> (big endian).
>
> I can get the error from just importing sympy.physics.quantum.matrixcache.
>  It makes sense because we are passing sympy.I with dtype 'complex' to
> numpy.
>
> Ted
>
> Traceback (most recent call last):
>  File "setup.py", line 269, in <module>
>    'audit' : audit,
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py",
> line 151, in setup
>    dist.run_commands()
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
> line 974, in run_commands
>    self.run_command(cmd)
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
> line 994, in run_command
>    cmd_obj.run()
>  File "setup.py", line 161, in run
>    if sympy.test():
>  File "sympy/utilities/runtests.py", line 181, in test
>    return t.test(sort=sort)
>  File "sympy/utilities/runtests.py", line 487, in test
>    self.test_file(f)
>  File "sympy/utilities/runtests.py", line 499, in test_file
>    execfile(filename, gl)
>  File
> "/users/ted/developer/opensource/sympy/sympy_github2/sympy/physics/quantum/tests/test_gate.py",
> line 4, in <module>
>    from sympy.physics.quantum.gate import (XGate, YGate, ZGate,
> random_circuit,
>  File "sympy/physics/quantum/gate.py", line 31, in <module>
>    from sympy.physics.quantum.matrixcache import matrix_cache
>  File "sympy/physics/quantum/matrixcache.py", line 92, in <module>
>    matrix_cache.cache_matrix('Y', Matrix([[0, -I], [I, 0]]))
>  File "sympy/physics/quantum/matrixcache.py", line 38, in cache_matrix
>    self._numpy_matrix(name, m)
>  File "sympy/physics/quantum/matrixcache.py", line 72, in _numpy_matrix
>    m = to_numpy(m, dtype=self.dtype)
>  File "sympy/physics/quantum/matrixutils.py", line 99, in to_numpy
>    return sympy_to_numpy(m, dtype=dtype)
>  File "sympy/physics/quantum/matrixutils.py", line 53, in sympy_to_numpy
>    return np.matrix(m.tolist(), dtype=dtype)
>  File "numpy/matrixlib/defmatrix.py", line 257, in __new__
> TypeError: a float is required
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to