I have to model a Wilberforce pendulum in Python for my final project in my classical mechanics class. I am getting the error “ValueError: setting an array element with a sequence.” inside my loop that is using the Verlet method to approximate the accelerations and displacement to then plotted. I have asked my professor but unfortunately, he has not seen this error before so he is not sure how to address it, especially since I am adapting his working code to the Wilberforce pendulum.
If anybody knows how to get this error and/or see any discrepancies in my code it will be greatly appreciated.
Thank you
Here is the link for the code : https://colab.research.google.com/drive/11hwmNSp56iIb2GO7Jo_un8KTOx7f-vxV?usp=sharing
Ricky De Vicente Fernandez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.