ZeroDivisionError: float division

Traceback (most recent call last): File "/home/s0575124/star/version_5.02/wall_wave/base_refinement/", line 19, in ? test.cycle() File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 332, in cycle self._local_dir()) File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 287, in analyse comparison() File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 1032, in __call__ self.update_metrics(current_time, self._sim_wave) File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 956, in update_metrics metric_pair[0](time, methodtocall()) File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 340, in wavelength w_length = self.linear_cross(crossing_list[2], zero) \ File "/home/s0575124/programming/python/fifthwave/trunk/src/", line 360, in linear_cross m = (y2 - y1) / (x2 - x1)


Id: d29580883b7a7dcf5c826ad7b84e8c05fa2c3e76
Type: bugfix
Creation time: 2010-11-23 11:32
Creator: Mathew Topper <mathew.topper@...>
Release: 0.2 (released 2011-02-09)
Status: closed : fixed fixed
In progress: 63 minutes

Issue log

2010-11-23 12:38 Mathew Topper <mathew.topper@...> closed with disposition fixed
Added protection for duplicates into TwoD_Wave_Form.linear_cross and also a test for the given point being right on the crossing point.
2010-11-23 12:04 Mathew Topper <mathew.topper@...> commented
I think that TwoD_Wave_Form.linear_cross is too simple. It just picks up the next node and assumes that the crossing lies there. It doesn't check for dupes. I don't think it handles the zero case either. Need to make it smarter. Might consider sanitising the input for dupes as well, but building the protection in now, might be safer.
2010-11-23 11:35 Mathew Topper <mathew.topper@...> changed status from unstarted to in_progress
2010-11-23 11:32 Mathew Topper <mathew.topper@...> created