how to calculate statistics (mean, variance, skewness,kutosis)on whole dataset . loading huge dataset at once is a problem. is there any trick for this?

i could not find in built functions for skewness , kutosis for tensors.
how to move numpy nd array to gpu in that case?

thanks!
for few datasets, the skewness and kurtosis values are nan. could you please tell me why is that? what is the statistical significance of that?