numarray.sum should raise exception for wrong axis argument

June 14, 2004
10:03 a.m.
Hi, please take a look at this:
na.sum( na.zeros((2,6)) ) [0 0 0 0 0 0] na.sum( na.zeros((2,6)) , 0) [0 0 0 0 0 0] na.sum( na.zeros((2,6)) , 1) [0 0] na.sum( na.zeros((2,6)) , 2) [0 0] na.sum( na.zeros((2,6)) , 3) [0 0] na.sum( na.zeros((2,6)) , 4) [0 0] na.sum( na.zeros((2,6)) , -1) [0 0] na.sum( na.zeros((2,6)) , -2) [0 0 0 0 0 0] na.sum( na.zeros((2,6)) , -3) [0 0] na.sum( na.zeros((2,6)) , -4) [0 0]
I think here should be a ValueError exception thrown rather than defaulting to the '-1'-axis. Comments ? Thanks, Sebastian Haase
7558
Age (days ago)
7558
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sebastian Haase