解决AttributeError: module ‘matplotlib.mlab‘ has no attribute ‘normpdf‘

客官°小女子只卖身不卖艺 2022-12-31 12:21 224阅读 0赞

解决AttributeError: module ‘matplotlib.mlab’ has no attribute ‘normpdf’

报错代码

  1. y = mlab.normpdf(bins, mu, sigma)

报错信息

  1. AttributeError: module 'matplotlib.mlab' has no attribute 'normpdf'

解决办法

  1. from scipy.stats import norm
  2. y = norm.pdf(bins, mu, sigma)

欢迎大家交流学习,任何问题都可以留言

发表评论

表情:
评论列表 (有 0 条评论,224人围观)

还没有评论,来说两句吧...

相关阅读