From: Konrad H. <hi...@cn...> - 2002-06-12 08:54:16
|
"eric jones" <er...@en...> writes: > others) would be very slow with this approach. Your copy-on-demand > suggestion might work though. Its implementation would be more complex, > but I don't think it would require cooperation from the Python core.? It wouldn't, and I am not sure the implementation would be much more complex, but then I haven't tried. Having both copy on demand and views is difficult, both conceptually and implementationwise, but with copy-on-demand, views become less important. > Copy-on-demand doesn't really fit with python's 'assignments are > references" approach to things though does it? Using foo = bar in > Python and then changing an element of foo will also change bar. So, I That would be true as well with copy-on-demand arrays, as foo and bar would be the same object. Semantically, copy-on-demand would be equivalent to copying when slicing, which is exactly Python's behaviour for lists. > So, how about add.reduce() keep axis=0 to match the behavior of Python, > but sum() and friends defaulted to axis=-1 to match the rest of the That sounds like the most arbitrary inconsistency - add.reduce and sum are synonyms for me. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |