weixin_48923273 2021-10-05 16:50 采纳率: 100%
浏览 230
已结题

TypeError: 'float' object cannot be interpreted as an integer这个是哪儿有问题呀

(IPdb [4]): runfile('E:/EDEM/Matrial Calculate/Static angle of repose test/Static_angle_of_repose_analyst.py', wdir='E:/EDEM/Matrial Calculate/Static angle of repose test')

Loading: Static_angle_of_repose_example.dem


Processing: Static_angle_of_repose_example.dem

Traceback (most recent call last):

File "E:\EDEM\Matrial Calculate\Static angle of repose test\Static_angle_of_repose_analyst.py", line 62, in
spacing=np.linspace(top_rad,base_rad,(base_rad-top_rad)/bin_size)

File "<__array_function__ internals>", line 5, in linspace

File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\function_base.py", line 120, in linspace
num = operator.index(num)

TypeError: 'float' object cannot be interpreted as an integer

  • 写回答

2条回答 默认 最新

  • 想上天的狗 2021-10-05 16:55
    关注

    应该是这行

    
    spacing=np.linspace(top_rad,base_rad,(base_rad-top_rad)//bin_size)
    
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 10月13日
  • 已采纳回答 10月5日
  • 创建了问题 10月5日

悬赏问题

  • ¥15 matlab最小二乘法拟合非线性曲线提问
  • ¥15 电脑锁屏时vba运行SAP,excel数据不能复制到SAP
  • ¥50 74LS系列 74LS00 74LS04设计一个RS485电路(关键词-差分)
  • ¥30 各位help写一下代码
  • ¥15 在运行SDEdit模型下载不了
  • ¥15 求51控制l298n驱动的小车中超声波避障怎么写
  • ¥15 电脑连上WIFI却用不了
  • ¥30 MATLAB在RLC电路的固有响应和阶跃响应GUI仿真报告
  • ¥15 hyper-v出现的问题
  • ¥15 有能用的可加酬金,求可以批量下载懒人听书的软件,能登录自己帐号的。