Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-12 Thread Thomas Rachel
Am 11.06.2011 03:02 schrieb Gabriel Genellina: Perhaps those names make sense in your problem at hand, but usually I try to use more meaningful ones. Until here we agree. 0 and O look very similar in some fonts. That is right - but who would use such fonts for programming? Thomas --

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG = cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG = cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Tim Chase
operand type(s) for +: 'float' and 'tuple' I'm working with networkx and my program is this one: ... T0 = initCost*0,1 Here, you're setting T0 to the tuple (initCost*0, 1) == (0, 1). I think you mean to use a period instead of a comma. You then try to add that to a float (cost), and Python

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
, line 168, inmodule      if (costGG= cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm working with networkx and my program is this one: ... T0 = initCost*0,1 Here, you're setting T0 to the tuple (initCost*0, 1) == (0, 1).  I think you mean to use

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
= cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I see Tim Chase already told you about this error. Let me make a few comments about the rest. try: import matplotlib.pyplot as plt except: raise I guess the above try/except was left from some earlier debugging

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
= cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I see Tim Chase already told you about this error. Let me make a few comments about the rest. try: import matplotlib.pyplot as plt except: raise I guess the above try/except was left from some earlier debugging

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Terry Reedy
operand type(s) for +: 'float' and 'tuple' I'm working with networkx and my program is this one: [snip about 100 lines] Before posting code that does not work, it is a good idea to reduce to to some minimum needed to exhibit the problem. If you had done that, you may well have found the answer