Hi, I would like to be able to switch between swiginac and sympy
objects to be able to test both packages (for a while). I have a
problem with multiplication with sympy objects.
import swiginac
import sympy
x = swiginac.symbol(x)
y = sympy.Symbol(y)
class Foo:
def __init__(self):
Hi, I would like to be able to switch between swiginac and sympy
objects to be able to test both packages (for a while). I have a
problem with multiplication with sympy objects.
import swiginac
import sympy
x = swiginac.symbol(x)
y = sympy.Symbol(y)
class Foo:
def __init__(self):
On Dec 28, 9:11 am, kent-and [EMAIL PROTECTED] wrote:
class Foo:
def __init__(self):
self.field = 1.0
def __mul__(self, other):
print Multiplication in Foo from right
self.field = self.field * other
def __rmul__(self, other):
print
On Dec 28, 2007 10:18 AM, Pearu Peterson [EMAIL PROTECTED] wrote:
On Dec 28, 9:11 am, kent-and [EMAIL PROTECTED] wrote:
class Foo:
def __init__(self):
self.field = 1.0
def __mul__(self, other):
print Multiplication in Foo from right
self.field =
On Dec 28, 10:12 am, Ondrej Certik [EMAIL PROTECTED] wrote:
On Dec 28, 2007 10:18 AM, Pearu Peterson [EMAIL PROTECTED] wrote:
Try deriving Foo from sympy.Basic. Actually the __mul__ code in sympy
is broken as it should return NotImplemented when it gets an
unknown (to sympy) object as
On Dec 28, 2007 11:48 AM, Pearu Peterson [EMAIL PROTECTED] wrote:
On Dec 28, 10:12 am, Ondrej Certik [EMAIL PROTECTED] wrote:
On Dec 28, 2007 10:18 AM, Pearu Peterson [EMAIL PROTECTED] wrote:
Try deriving Foo from sympy.Basic. Actually the __mul__ code in sympy
is broken as it
On 28 Des, 10:18, Pearu Peterson [EMAIL PROTECTED] wrote:
On Dec 28, 9:11 am, kent-and [EMAIL PROTECTED] wrote:
class Foo:
def __init__(self):
self.field = 1.0
def __mul__(self, other):
print Multiplication in Foo from right
self.field =