Open masa16 opened 7 years ago
Hi! IMO pointwise max/min operations should be public class methods of the corresponding class (NArray,NMatrix,...).
Numo.max would suggests an operation on objetcs of different Numo-classes
hth
I consider Numo module is dedicated to Numo::NArray class objects. This is similar to Math module that calculates with Float objects.
Ah, I see - I thought Numo would be a module for NArray and NMatrix. Will there be no Numo::NMatrix in the future?
I cannot afford to maintain so many classes, so do not consider something like Numo::NMatrix.
No Problem - NArray is multidimensional out of the box. I was just asking, because some time ago I ran into problems with building gsl-bindings. The gem I used supported NArray or NMatrix based builds, but using NMatrix from sciruby. This clashed (at least IMO) with the NMatrix class from "the old" narray implementation. anyhow ... since you created Numo::GSL, this issue is solved ;-)
back to the topic - My favourites are both
Numo.max(a,b,...)
a.max(b)
I guess it's rather easy to let a.max(b) make use of Numo.max(a,b) in order to stay with a single implementation.
Numpy has confusing two functions: numpy.max and numpy.maximum. Numo::NArray#max() method is same as numpy.max. Now I need to define the specification of a method corresponding to numpy.maximum. Current ideas: