Outputs a vector with length size and the same dtype as weights.
If weights are empty, then index i stores the number of times the value
i is counted in x. If weights are non-empty, then index i stores the
sum of the value in weights at each index where the corresponding value in
x is i.
Values in x outside of the range [0, size) are ignored.
Outputs a vector with length
size
and the same dtype asweights
.If
weights
are empty, then indexi
stores the number of times the valuei
is counted inx
. Ifweights
are non-empty, then indexi
stores the sum of the value inweights
at each index where the corresponding value inx
isi
.Values in
x
outside of the range [0, size) are ignored.