[Numpy-discussion] [enhancement] sum_angle() and sum_polar()
Wed Mar 7 12:39:46 CST 2012
I am proposing to add the the two following functions to
sum_angle() computes the sum of a 2-d array along an angled axis
sum_polar() computes the sum of a 2-d array along radial lines or
along azimuthal circles
When I was looking for a solution to these problems of calculating
special sums of 2-d arrays I could not find anything and it took me a
while to figure out a (hopefully) useful and consistent algorithm.
I can see how one would extend these to higher dimensions but that
would preclude using bincount() to do the heavy lifting.
Looking at some other functions, the doctests might need to be split
into real examples and unittests.
More information about the NumPy-Discussion