From: Todd M. <jm...@st...> - 2005-01-10 17:06:25
|
On Mon, 2005-01-10 at 06:23, John Hunter wrote: > >>>>> "John" == John Hunter <jdh...@ac...> writes: > > John> I'm happy with Fernando's proposed names amin, amax, around, > John> etc. If everyone else is too, I propose Andrew implement > John> his patch, provide the compatibility names, and update the > John> relevant docs to advertise this prominently: API_CHANGES, > John> CHANGELOG, tutorial and users guide. Particularly in the > John> latter two, I think we should warn people about the > John> potential performance hit of using the builtin min, max and > John> friends on large arrays. > > Hmm, another thought. > > If we are going to make this change for the pylab namespace, then it > seems we might as well make the change in the numerix namespace as > well, since all the same arguments apply. I think doing different > things in numerix and pylab *is* a recipe for confusion. What do you > think Todd, does this seem sensible? > > Basically, the theme would be we use the underlying names from > Numeric/numarray except when they clash with python builtins, in which > case we'd use something like the a* names Fernando proposed. > > Of course, changing the numerix names would mean the matplotlib code > and examples will have to be updated as well. The former should be > relatively easy since I believe there are no uses of unqualified min > and max from numerix in the base code. Eg, we do in axes.py > > from numerix import max as nxmax > from numerix import min as nxmin > > and in mlab.py we do MLab.max. But we'll have to be careful to make > sure all the names Andrew identified are handled thoughout the coude > and examples... > > JDH This all sounds fine to me. My understanding is that anywhere we "get this wrong" the impact will be degraded performance. As an aside, I avoid "from *" like the plague myself but understand that it's important to optimize interactive use. Unleash Andrew and I'll try to propagate the changes forward to Scipy. Todd |