AttributeError: 'Random' object has no attribute 'integers'
时间: 2023-10-05 14:06:49 浏览: 98
Python3下错误AttributeError: ‘dict’ object has no attribute’iteritems‘的分析与解决
5星 · 资源好评率100%
根据引用内容,出现了错误信息"AttributeError: 'Random' object has no attribute 'integers'"。这个错误是因为代码中使用了"integers"方法,而实际上"Random"对象没有这个属性。提供了一种解决方法,即将代码中的"integers"方法替换为"randint"方法。所以你可以尝试将代码中的"integers"方法替换为"randint"方法来解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [AttributeError: ‘numpy.random._generator.Generator‘ object has no attribute ‘randint](https://blog.csdn.net/w5688414/article/details/124655644)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文