Hi Sebastian,

On Sun, Mar 23, 2008 at 10:01 PM, Sebastian Haase <[EMAIL PROTECTED]> wrote:
>
>  Hi Ondrej,
>  below is the full traceback.
>  I think I'm now guesing the problem: My wx - PyShell is part of bigger
>  image analysis package that I'm developping; and I recently switched
>  over to start the python interpreter using "python -Qnew" - i.e. it
>  defaults to "true division" ,  so that 1/2 == .5
>  In other words I might have to go through the sympy source and insert
>  a bunch "/" -> "//" replacements.
>
>  Indeed, I just ran it using "old" default division, and the wx version
>  runs just like the non wx.
>  Maybe you guys would be interested in proofing your code for
>  true-division (Python 3000). It sure would make sense for a math
>  package like sympy ;-)

Oh, absolutely. :)

http://code.google.com/p/sympy/issues/detail?id=761

We have some tests for that, but apparently they are not enough. I just did:

$ python -Qnew /usr/bin/py.test sympy/core/

and a lot of bugs occured. So definitely a place for a cleanup. So
that's it imho.

So it's more of a luck, that things work in isympy, because  isympy
uses true division by default...

>
>  Thanks for the quick reply -- I will go and get the new pyglet 1.1.  I
>  suppose I can do a drop-in replacement into
>  C:\Python25\Lib\site-packages\sympy\thirdparty\pyglet\pyglet

Yep. Please let us know if it works and if things got better.

>  Thanks again for the quick reply and of course  for sympy.
>  - Sebastian Haase
>
>
>
>
>  >>> Plot(x*y**3-y*x**3)
>
> [0]: x*y**3 - y*x**3, 'mode=cartesian'
>
> >>> Exception in thread Thread-2:
>  Traceback (most recent call last):
>   File "C:\Python25\lib\threading.py", line 460, in __bootstrap
>     self.run()
>   File "C:\Python25\lib\threading.py", line 440, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "C:\Python25\Lib\site-packages\sympy\plotting\plot_mode_base.py",
>  line 259, in _calculate_all
>     self._calculate_verts()
>   File "C:\Python25\Lib\site-packages\sympy\plotting\plot_mode_base.py",
>  line 265, in _calculate_verts
>     try: self._on_calculate_verts()
>   File "C:\Python25\Lib\site-packages\sympy\plotting\plot_surface.py",
>  line 13, in _on_calculate_verts
>     self.u_set = list(self.u_interval.frange())
>   File "C:\Python25\Lib\site-packages\sympy\plotting\plot_interval.py",
>  line 163, in frange
>     for i in self.vrange():
>   File "C:\Python25\Lib\site-packages\sympy\plotting\plot_interval.py",
>  line 146, in vrange
>     a = self.v_min + (d * Integer(i))
>   File "C:\Python25\Lib\site-packages\sympy\core\numbers.py", line
>  702, in __rmul__
>     return Rational.__mul__(a, b)
>   File "C:\Python25\Lib\site-packages\sympy\core\sympify.py", line
>  273, in __sympifyit_wrapper
>     return func(a, b)
>   File "C:\Python25\Lib\site-packages\sympy\core\numbers.py", line
>  493, in __mul__
>     return Rational(self.p * other.p, self.q * other.q)
>   File "C:\Python25\Lib\site-packages\sympy\core\cache.py", line 264, in 
> wrapper
>     new_args = tuple([template.process(a,func,i) for (a, template, i)
>  in zip(args, self.arg_templates, range(len(args)))])
>   File "C:\Python25\Lib\site-packages\sympy\core\cache.py", line 186, in 
> process
>     raise ValueError('%s %s-th argument must be of type %r but got %r'
>  % (func_src, index, self.allowed_types, obj))
>
> ValueError: C:\Python25\Lib\site-packages\sympy\core\numbers.py:435:function
>  __new__ 1-th argument must be of type (<type 'int'>, <type 'long'>,
>  <type 'str'>) but got 0.0


I don't see from this traceback why it doesn't work, but I guess it's
the true division problem.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
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