For the moment, mean() and sum() are only implemented as functions, not methods. So you can write sum(x), but not x.sum(). Once the codegen issues are figured out, that will be easy to change.
For all the reduction funtions (min(), argMin(), sum(), etc.) I've included two versions. There's one that works over the whole array, and a second one that does the reduction over a single axis. I modelled the API on Numpy.
This implements #74.
For the moment,
mean()
andsum()
are only implemented as functions, not methods. So you can writesum(x)
, but notx.sum()
. Once the codegen issues are figured out, that will be easy to change.For all the reduction funtions (
min()
,argMin()
,sum()
, etc.) I've included two versions. There's one that works over the whole array, and a second one that does the reduction over a single axis. I modelled the API on Numpy.