TypeError: 'numpy.float64' object does not support item assignment - Similar code, error raises

后端 未结 1 1661
-上瘾入骨i
-上瘾入骨i 2021-01-29 00:18

I am writing a Molecular Dynamics code and for that I have a function that computes forces between particles: conservative, random and dissipative forces. The conservative force

1条回答
  •  抹茶落季
    2021-01-29 00:51

    SOLVED: As @micric pointed out, there is a variable inside the second loop called 'fr', which is of type float. I made the mistake of using the same name for an array. Hence Python's complaints.

    0 讨论(0)
提交回复
热议问题