Neal Becker
2015-07-14 11:19:21 UTC
I wanted the function of an array that accumulates my results, it starts at
zero size, and resizes as needed. New results are added using
accumulated += new_array
A simple implementation of this is here:
https://gist.github.com/2ab48e25fd460990d045.git
I have 2 questions:
1. Is this a reasonable approach?
2. I overloaded += to do 1) resize 2) call ndarray += operator
Is there some way to just overload all arithmetic operators similarly all at
the same time? (I don't need them for the current work, I'm just curious).
zero size, and resizes as needed. New results are added using
accumulated += new_array
A simple implementation of this is here:
https://gist.github.com/2ab48e25fd460990d045.git
I have 2 questions:
1. Is this a reasonable approach?
2. I overloaded += to do 1) resize 2) call ndarray += operator
Is there some way to just overload all arithmetic operators similarly all at
the same time? (I don't need them for the current work, I'm just curious).