From: Thomas B. <tho...@ya...> - 2004-06-19 00:17:15
|
Hello, i cant get stock_demo.py to run correctly. it seems there is a problem reading the data files, specifically using numarray/Numeric's "fromstring" on the example data files. the first result below is with numarray and the second is with Numeric. im using python 2.3.4 and matplotlib 0.54.2 win32 for python 2.3. C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 7, in ? (d1, p1, d2, p2 ) = get_two_stock_data() File "C:\Matplotlib\matplotlib src\examples\data_helper.py", line 12, in get_two_stock_data M1 = fromstring( file('data/%s.dat' % ticker1, 'rb').read(), 'd') File "C:\Python23\Lib\site-packages\numarray\numarraycore.py", line 358, in fromstring raise ValueError("Type size inconsistent with string length") ValueError: Type size inconsistent with string length C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 7, in ? (d1, p1, d2, p2 ) = get_two_stock_data() File "C:\Matplotlib\matplotlib src\examples\data_helper.py", line 12, in get_two_stock_data M1 = fromstring( file('data/%s.dat' % ticker1, 'rb').read(), 'd') ValueError: string size must be a multiple of element size since the example data files are binary, i cant figure out how to investigate what may be happening with them. Is there something else i should be doing? Tks vm, Tom |