Changes

Jump to navigation Jump to search

Matplotlib dateutil bug

458 bytes added, 17:45, 19 October 2015
Forced creation of a TOC - this will improve the formatting on the main page 'Did you know...' section.
__TOC__
 
== Background ==
When you create a range in relax, it is created as an xrange object.<br>
This is due to memory issues, which you can read about [http://thread.gmane.org/gmane.science.nmr.relax.devel/4862/focus=4865 here.]
You cannot by default slice through xrange objects.
The '''dateutil.rrule''' package (version 1.5) used in matplotlib/pylab creates some list, which it expects it can slice through.<br>'''dateutil.rrule''' package (version 2.2) does not have this problem. 
But relax will create these as '''xrange''' which is not-sliceable.
== Change bug in dateutil.rrule ==
The recommended way is to update your version of the '''python-dateutil''' package.
 
<source lang="bash">
sudo pip install python-dateutil --upgrade
</source>
 
If you by some means need to stay with the current versions, you can try.
<source lang="bash">
bash
Test if it worked
<source lang="bash">
cat <<'EOF' > relax_test.py
from pylab import *
EOF
$ relax relax_test.py
</source>
== See also ==
[[Category:matplotlib]]
Trusted, Bureaucrats
4,228

edits

Navigation menu