python错误提示:TypeError: ‘numpy.float64’ object cannot be interpreted as an integer

** TypeError: ‘numpy.float64’ object cannot be interpreted as an integer **
出现此情况的原因是plt.hist(normal_values, np.sqrt(N), normed=True, lw=1)中的np.sqrt(N)是浮点型数据,而hist要求是int型数据,所有加上int(np.sqrt(N))python错误提示:TypeError: ‘numpy.float64’ object cannot be interpreted as an integer