On Friday 28 July 2006 17:19, Richard Ruth wrote: > I upgraded to matplotlib-0.87.4 Now I receive an error like the following > every time I try to use matplotlib.dates. The following error messages > were generated when I tried to run matplotlib-0.87.4/examples/date_demo1.py > > Any Idea on how I can get dates working again? > (I am running the 2.6.17.6 kernel on a 64-bit linux system)
Richard, in matplotlib/dates.py, change line 155 from remainder = x - ix to remainder = float(x) - ix The problem is that matplotlib uses numpy arrays for the xaxis. As you have a 64b system, the arrays are in float64scalars, that divmod doesn't know how to process (unless you have a very recent of numpy). The trick above forces a downcasting of float64scalar to float32scalar, divmod can now work. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users