From: Guy K. K. <g....@ma...> - 2009-06-29 07:07:50
|
BTW, I have added a warning to the wiki page on the modified version to clarify the difference between the two versions. On Mon, 29 Jun 2009 18:25:28 Bruce Sherwood wrote: > 3) There exists a large body of existing VPython programs developed over > the last 9 years that various constituencies depend on working, and > removing the numpy and math imports will break many (most?) of these. Many > of these users are students and faculty who cannot be easily reached to > explain a major change; they don't read computer lists. I can understand this point of view. That's why it's vital to keep the API frozen on a major release series (5.x). > 4) There is a tricky point concerning mathematical functions that appear in > both math and numpy. When Arthur Siegel did the work to convert Visual from > dependence on Numeric to dependence on numpy, performance on many existing > programs was horrible, because numpy scalar floats, unlike Numeric scalar > floats, were no longer captured by the fast math functions but instead were > processed by the array-handling numpy functions. There is arcane code in > Visual to get around this problem. Few users would be able to figure this > out for themselves. But those distinctions happen in module space of the visual module, not on the user level. What the user gets is just a cluttered mix and mash of functions with overlapping name spaces. There's nothing wrong in keeping this distinction for speed up under the bonnet of the module (which is what I have done in the modification, too). The aim is just to give the user a *predictable* experience for future versions, which is not guaranteed if a module messes with the name spaces from other modules that are not obviously related. The modifications I have provided are (A) for my own sanity, and might (B) be used as a basis for future development towards a 6.x release series of VPython. I just wanted to be *nice* by offering that stuff to others as well, who've been bitten by the polluted name space. BTW, have you ever tried to familiarise yourself with a new module/package by using IPython interactively? It's quite neat, as it offers tab completion to find potential good candidates for something. This has bitterly failed using the default visual module, as it is just cluttered by 100s of members that have got nothing obvious to do with VPython, but are swamped in through numpy and math, and they totally obfuscate the use. Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |