From: Bruce S. <Bru...@nc...> - 2006-10-30 13:36:15
|
This is wonderful news, Arthur. Thank you! I am very far from an expert on autoconf, but I have worked with it some and can probably make the necessary changes next week, after sending the textbook revision to the publisher. I will of course need your changes. I agree with your approach of not using the compatibility library. I think there are few existing programs that need to be changed (of the VPython example programs, maybe only gas and stars). I think I read that numpy offers a Python program that reads Python source and fixes it up. If so, we can advertise that utility to users. Again, thanks so much on behalf of all the VPython community for stepping up the plate and hitting a home run when one was needed. Bruce Arthur wrote: > Folks, > > I have now - I believe - successfully implemented a VPython that is > compatible with the final 1.0 release of the numpy library. > > I have tried to do so touching as little of the existing code as > possible, hoping to avoid the possibility of inadvertently introducing > bugs into the code in this process. In fact the most radical surgery to > the existing code is a simplification - i.e. removing code and logic > that was there only to allow for the build against the *both* Numeric > and numarray libraries and the selection of one or the other as a > preference. My code assumes a build against numpy, and only numpy. > > As hoped, there wasn't all that more that needed to be done to get the > basic compatibility issues resolved beyond what could be learned from > Phil Austin's approach in moving his num_util helper functions for > boost::python::numeric arrays (used in the current vpython release) to > numpy compatibility. > > See. > > http://www.eos.ubc.ca/research/clouds/software/pythonlibs/num_util/num_util_release2/ > > The only problems I have had running the demos and my own code that > utilizes vpython is in differences between the Numeric and numpy Python > APIs. For example numpy wants a lower case type identifier, e.g."float", > rather than as upper case "Float" when creating an array with a type > identifier. > > Numpy does have an "oldnumeric.py" library whose purpose - as the name > implies - is to add a compatibility layer between numpy and the older > numeric libraries at the Python coding level.. It is trivial to have > that library load as part of the start-up of vpython. For my purposes, > I want to begin to understand the numpy library better, and having the > incompatibilities fall out is helpful, so I have not done so. But Bruce > might want to include it in the vpython start-up routines, at least > during some transition period. > > What I have. *not* done is accomplish the changes to the build mechanism > that are necessary to detect the numpy library as part of the configure > routine and to create the proper Makefile or issue the appropriate > messages in case of its failure to do so. I have simply been manually > editing the Makefile for the few changes necessary to build against numpy. > > My interest in learning more about the vpython, boost and numpy > internals, and get more hands on with C++ in general, made this little > numpy compatibility effort on my part something I enjoyed, being > compatible with my more general personal objectives. Dealing with the > build issues would be less so.So I am hoping someone else will step up > to the plate. OTOH, the necessary changes are probably not hard to > accomplish, and if no one else does, I will try to get to it. > > Bruce, > > What next? > > Art > > > > > > ------------------------------------------------------------------------- > 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 > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |