[Numpy-discussion] Bug or feature ?
jeanluc.menut at free.fr
Mon Jan 24 04:49:07 CST 2005
I'm using numarray, I'm wondering about the behaviour of some functions
which seem odd to me:
1) When I want to sum all the elements of an array, I can do sum(array)
or array.sum() :
With the first method
It seems to be impossible to sum all the elements with sum(array).
With the second,
In this case, it's ok but :
I know that it's stupid to sum only one element but it's force me to
plan that case in my program (and I don't want to check for each case)
if I don't want an error.
2) When I want to replace one element in an array :
I know that I created the array as an array of integer, but at least I
can expect an error message.
Anyboby knows if these behaviour are bugs or not ? And if not, I will be
glad the have somme explication about the choice of this behaviour.
Thanks for your help,
More information about the Numpy-discussion