Sorry guys, I have a silly question.I am using python3.5 and pytorch 3.1, when I type
torch.Tensor(1000, 1000).mean()

I get the following result:
>>> import torch
>>> torch.Tensor(1000, 1000).mean()
0.0
>>> torch.Tensor(1000, 1000).mean()
nan
>>> torch.Tensor(1000, 1000).mean()
nan


nan stands for not a number, right?
but when I type this:
>>> torch.Tensor(1000, 1000)

 0.0000e+00  4.3397e+02  0.0000e+00  ...   0.0000e+00  0.0000e+00  2.2500e+00
 0.0000e+00  0.0000e+00  0.0000e+00  ...   0.0000e+00  1.0842e-19  1.9776e+00
 0.0000e+00  0.0000e+00  0.0000e+00  ...   0.0000e+00  0.0000e+00  0.0000e+00
                ...                   ⋱                   ...                
 0.0000e+00  0.0000e+00  0.0000e+00  ...   0.0000e+00  0.0000e+00  0.0000e+00
 0.0000e+00  0.0000e+00  0.0000e+00  ...   0.0000e+00  0.0000e+00  0.0000e+00
 0.0000e+00  0.0000e+00  0.0000e+00  ...   0.0000e+00  0.0000e+00  0.0000e+00
[torch.FloatTensor of size 1000x1000]


The tensor is filled with  numbers.
So, two questions:


How come 1000000 numbers’ mean is not a number?


And why sometimes I get nan, but sometimes I get numbers?Like this:


>>> torch.Tensor(1000, 1000).mean()
-1.0074733384568384e+32

Thanks in advance.