[Matrix-SIG] Active arrays
Janko Hauser
jhauser@ifm.uni-kiel.de
Thu, 20 Jan 2000 00:51:01 +0100 (CET)
Two, no three things I want to add to the discussion.
1. I welcome the addition of the new casting machinery to Numpy. It
seems, as this needs to go into the core, so some files needs to be
changed. It's totally different than the older proposals (typing
like the longs in standard python), but it seems to be suitable for
the problems one had until now.
I would suggest to have a new flag to asarray(), like
a=ones((10,8))
b=asarray(a, nocast=1) # nocast is not an optimal name.
The current idea with asarray is to guarantee something, without
doing a copy if not wanted or necessary. asarray is probably used
in many functions already, where one wants that a given parameter
fulfills some constraints.
Then a way is needed to ask for this property, and perhaps I have
missed it but nobody mentioned the removing of this property. It
would be good to do this without a copy of the data.
2. As we see with this addition to NumPy we need a policy for the
cvs-development. Should this be added in a branch, what happens if
two people work on the same files, but with different branches. How
can interested people easily get an overview about the different
developments and check out a complete ``cutting edge'' version?
The piddle folks are already working at such a policy, although
they have a more modular code base with different main developers
for every module. Perhaps we should look into this.
3. I would also like to include array_map and array_set into the main
code base. But in an own util module. array_set is not the complete
solution to the gather/... thing. So it should be made clear, that
perhaps there will be some other more general way to do this. Also
with array_map. I really like this, but I need to build constructs
to use it with lower dimensional functions. Like applying a one
dimensional spline interpolation to every vertical profile in my
three dimensional temperature field. These are involving globals,
and I actually haven't really timed it, but it seems to work
well. So what I mean, these things are evolving, perhaps changing,
so we should make them accessible but keep them separate, at least
for some time.
Then some names for this `active' thingy.
typed
keeptype
hold
holdtype
rulez :-) # Heh NumPy rulez
__Janko