Closed aewallin closed 8 years ago
Is it a script you wrote? If yes, can you please attach the file?
I had this same issue on windows, from any of the included examples, with python2. I was able to fix it by forcing the time step calculation to use float math. I changed core.py line 166:
self.ts=self.te/float(self.ns)# time step, make sure this is a float!
I think this may be a python2/python3 issue, as they changed how division works.
the example I was trying is this: https://github.com/masfaraud/BMSpy/blob/master/examples/first_order.py
maybe you could automate testing with tox or a similar tool to catch buld/install problems on various platforms?
The problem was indeed a python2/python3 problem. I'll take a look at tox, thanks for the suggestion.
Traceback (most recent call last): File "bms_ex1.py", line 23, in
ds.Simulate()
File "build/bdist.linux-x86_64/egg/bms/core.py", line 343, in Simulate
File "build/bdist.linux-x86_64/egg/bms/blocks/continuous.py", line 145, in Solve
File "build/bdist.linux-x86_64/egg/bms/blocks/continuous.py", line 140, in OutputMatrices
File "build/bdist.linux-x86_64/egg/bms/blocks/continuous.py", line 128, in _get_M
ZeroDivisionError: float division by zero