Hello. I realize that the mean method can not be used in int types.
require 'numo/narray'
a = Numo::Int32.new(10).seq
puts a.mean
# undefined method `mean' for "Numo::Int32
Although it may be trivial, I feel this is a little inconvenient.
I would be happy if I could use mean method with int types.
As in the numpy example below.
import numpy as np
a = np.arange(10, dtype=np.int32)
print(a.mean())
# 4.5
Hello. I realize that the mean method can not be used in int types.
Although it may be trivial, I feel this is a little inconvenient. I would be happy if I could use
mean
method with int types. As in the numpy example below.