From: Bruce S. <bas...@nc...> - 2010-10-07 19:25:51
|
The issue is that importing visual also imports math and numpy, and does some tricky stuff to make sure that, for example, sqrt(scalar) uses the fast math.sqrt routine, not the numpy.sqrt routine which is much slower when acting on scalars. For a large group of casual users, and for backward compatibility with sizable numbers of programs in existence, it is important that "from visual import *" continue to behave as it has in the past. Note that "import visual as vp" also imports math and numpy, so that you'll find that vp.sqrt(3) does not give an error, nor does vp.sqrt(vp.array([3,3,3])). For a small but important group of expert users, it is important to have a way to import the visual objects and vector operations without importing anything else, and I've proposed a couple of different approaches, one of which requires including a couple of new files in the visual directory. What I'm seeking is which of these approaches for experts (or a different one) is the one the experts would prefer to be documented and encouraged. Bruce Sherwood On Thu, Oct 7, 2010 at 11:39 AM, Symion <kn...@ip...> wrote: > Hi there, > This is probably a naive question, but why not implement visual the same > way as the other modules? |