Hello, I have a very weird problem with matplotlib and reals. Before starting to explain please let me apologize, I'm a newbie in Python and I suspect I'm doing something horribly wrong.
I have exposed in Python a C++ class with Boost::Python (in the form of a shared object). This class (among other things) reads from a file a list of real numbers, and stores them internally as doubles. What happens is that when using matplotlib my exposed class internally begins to treat reals like they were integers. In other words, when reading reals from a file they are stored as integers, as can be seen by printing the contents of the class to screen: all decimal parts are truncated (i.e., 3.85000E5 instead of 3.8500052719E5). This is _not_ some kind of visualization bug, since my class discards reals whose absolute value is (almost) zero and indeed when using matplotlib the class loads fewer "reals" from the very same file (in other words, values whose abs is < 1 are seen as zeroes and as such they get discarded: all reals whose abs is < 1 are missing when using matplotlib). This is extremely strange to me, since I really don't get how matplotlib can influence the internal behaviour of my class. Is there somewhere some directive in python that can setup the floating point unit? The "bug" happens exactly after loading matplotlib, without it everything is alright. The C++ code from which the class derives has been tested quite thoroughly, so I don't think the problem stems from there. Any pointer would be greatly appreciated :) Thanks very much, Francesco (please CC as I'm not subscribed) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users