Python or matplotlib limitation error
Posted
by Werner
on Stack Overflow
See other posts from Stack Overflow
or by Werner
Published on 2010-03-17T18:30:08Z
Indexed on
2010/03/17
18:41 UTC
Read the original article
Hit count: 269
python
|matplotlib
Hi,
I wrote an algorithm using python and matplotlib that generates histograms from some text input data. When the number of data input is approx. greater than 15000, I get in the (append) line of my code:
mydata = []
for i in range(len(data)):
mydata.append(string.atof(data[i]))
the error:
Traceback (most recent call last):
File "get_histogram_picture.py", line 25, in <module>
mydata.append(string.atof(data[i]))
File "/usr/lib/python2.6/string.py", line 388, in atof
return _float(s)
ValueError: invalid literal for float(): -a
can it be an error in python ? What is the solution ?
Thanks
© Stack Overflow or respective owner