Hello,

Using 0.87.4, I'm getting this traceback with a date plot:


/usr/local/stow/matplotlib-0.87.4/lib/python2.4/site-packages/matplotlib/dates.py
 in _from_ordinalf(x, tz)
    154     dt = datetime.datetime.fromordinal(ix)
    155     remainder = x - ix
--> 156     hour, remainder = divmod(24*remainder, 1)
    157     minute, remainder = divmod(60*remainder, 1)
    158     second, remainder = divmod(60*remainder, 1)

ValueError: need more than 0 values to unpack
> /usr/local/stow/matplotlib-0.87.4/lib/python2.4/site-packages/matplotlib/dates.py(156)_from_ordinalf()
    155     remainder = x - ix
--> 156     hour, remainder = divmod(24*remainder, 1)
    157     minute, remainder = divmod(60*remainder, 1)


And sure enough,
    ipdb> divmod(0.0,1)
    (0.0, 0.0)
    ipdb> divmod( 24*remainder, 1 )
    ()

It looks like divmod is getting overloaded (?) or something in
CXX/cxx_extensions.cxx with [perhaps] this code:

    Py::Object PythonExtensionBase::number_divmod( const Py::Object & )
        { missing_method( number_divmod ); return Py::Nothing(); }

which would make sense, but I haven't explored it that thoroughly.  I
think what's happening is that I've got a numpy array scalar that is
sneaking in there somewhere.

For now, I'll just use the hack-fix of casting remainder to a float.

Thanks,
Glen



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

Reply via email to