[SciPy-dev] MCMC, Kalman Filtering, AI for SciPy?
Perry Greenfield
perry at stsci.edu
Thu Sep 30 11:12:16 EDT 2004
On Sep 30, 2004, at 3:40 AM, eric jones wrote:
> I don't like the replication idea very well. I think things should
> live in one place. Otherwise people will wonder if two functions that
> are actually the same have different purposes, implementation, etc.
>
I agree with this sentiment. Use the search tool to find out where the
one "true" item lives,
but don't use aliasing within the package hierarchy.
> I used to love "from xxx import *" and swore it was the right way to
> handle Numeric, etc. since I few "array" and friends as builtin
> functions... I guess I've been hanging out with to many computer
> scientists lately. Or perhaps it is the few times where I have
> wondered "where is function xxx [which is broken] coming from?" and
> struggled through a large codebase to track it down. We've had a
> nasty bug or two where one import * unexpectedly clobbered some
> functions from a previous import *. In any case, it is a (seldom
> broken) policy to never use import * in our code bases at Enthought.
> It is probably a good idea to apply this same policy to SciPy. Doing
> so would partially solve the problem you discuss.
>
This seems like a good idea as well. I don't see anything wrong with
using
something like:
import numarray as na
to make the code (and particularly expressions) more concise. It still
prevents the above
mentioned problems.
> Perry
More information about the SciPy-Dev
mailing list