In [12]: np.finfo(np.float16).max
Out[12]: 65500.0
In [15]: df['a']=np.array([656]*100)
In [16]: df['a'].sum()
Out[16]: 65600
In [20]: df['a'] = df['a'].astype(np.float16)
In [21]: df['a'].sum() # 当sum的值大于np.float16的最大范围时就返回inf,后面mean,std等都返回inf
Out[21]: inf
In [22]: df['a'].mean()
Out[22]: inf