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
--
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
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
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
, 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
= 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
= 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
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