From: Alan W. I. <ir...@be...> - 2007-08-16 15:57:38
|
On 2007-08-16 08:52+0100 Andrew Ross wrote: > > Alan, > > Example 21 is now disabled in the automatic tests since is doesn't work > with Numeric anyway. > > I've commented out the use of RandomArray for now since the only place > it is used is in example 21. Example 17 actually uses random.random, > which is part of python. This only generates single random numbers > though, not an array of random numbers. > > Works for me - can you check? Hi Andrew: This thread has spawned a number of related sub-topics which I want to address here. Let me take them one at a time.... (1) Sorry for the false alarm about RandomArray. I did have python-numeric-ext installed, but that referred to the python-2.3 version while I am running PLplot off of python-2.4. The fix was to install python2.4-numeric-ext. For now this minor Python versioning issue is not an issue for RandomArray because you have disabled its use in your current workaround, but at some point if such versioning issues get irritating enough we may want to take over maintenance of the CMake FindPythonLibs.cmake and FindPythonInterp.cmake modules and bring them into the modern world. (2) For exactly the same revision as last night (i.e., without your recent workaround to disable example 21) and with python2.4-numeric-ext installed, the error messages from ctest turned into *** PLPLOT ERROR *** plw3d: Invalid axis range, aborting operation *** PLPLOT WARNING *** plot3dcl: Maximum and minimum Z values are equal! "fixing"... *** PLPLOT ERROR *** plw3d: Invalid axis range, aborting operation .... -- Process completed Passed The following tests passed: examples_python >From your remarks and my later successful test with your workaround (see 3 below) those errors are due to example 21 (without your update to disable it). But why do all those PLPLOT ERRORs not propagate to the overall test status? If somebody ran the test without verbose, they would be convinced all was well with python even when example 21 has problems. The question boils down to why a python error such as a missing module generates a non-zero status code (which we do test for in test/test_python.sh), but PLPLOT ERROR does not. Hope you know how to fix this PLPLOT ERROR irritation with ctest (which I assume is a general PLplot problem and nothing specifically to do with our python interface). (3) With your workaround (Updated to revision 7807), I confirm that ctest works fine. However, Numeric is deprecated in favour of NumPy so I don't think we should cater to the Numeric deficiencies if the user has already upgraded to NumPy. So I think a better workaround would be to go ahead and import RandomArray (which makes current Numeric users like me import something they don't need, but too bad), and configure the examples list to exclude example 21 (perhaps with a warning message to upgrade to NumPy) if the user is using the deprecated Numeric interface. What do you think of this approach? BTW, I assume you agree with me there is no point at this stage in trying to get plgriddata to work for Numeric. In my view Numeric is a dead duck; I don't think the major Linux distros will support it on their own for too much longer since the core Numeric team has given up on it and joined the NumPy bandwagon. Anyhow, I personally plan to migrate to NumPy after I have finished my current research project. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |