Open masa16 opened 7 years ago
IMO it works like a constructor. So I would look for something like Numo.zeros_like(a) Or simply Numo.zeros(a).
Is this realy needed? you already have something very close to it
Numo::DFloat.zeros(b.shape)
I personally to not need all numpy methods - esp. one-liners like this. I do not see an benefit in replacing a one-liner with another one.
This methos is just same as
b.class.zeros(b.shape)
numpy.zeros_like frequently appears in numpy codes and I think situation is the same with NArray. So I think it has a benefit to write a code shortly.
@masa How about Numo::NArray.zeros_like(b)
?
Numo::NArray needs to have a method corresponding to:
In Ruby, the standard way is
This is wrong order if we regard this as an English phrase. Currently the name of this method is
new_zeros
but it seems not good name. Any idea?