dfd-tud / deda

https://dfd.inf.tu-dresden.de
GNU General Public License v3.0
1.59k stars 92 forks source link

RuntimeWarning: invalid value encountered in scalar divide #32

Closed martin3000 closed 2 months ago

martin3000 commented 3 months ago

.local/lib/python3.10/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide ret = ret.dtype.type(ret / rcount)

ret is 0.0, rcount is 0

Called from libdeda/print_parser.py", line 157, in _get_dxy dx = np.average((coords[0]-x)%p.d_i)

timojuez commented 2 months ago

Danke für den Report. I have not managed to reproduce this. Can you please give the full stack trace or show the command and the input file?

martin3000 commented 2 months ago

Sorry no, too long ago. I already forgot. Just avoid dividing by zero.