You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent fixes to the table writer for small values leads to a domain error when trying to write 0 because of the log10 call in the _digits_from_decimal function.
Traceback (most recent call last):
File "/Users/mtimc/sandbox/test-table.py", line 9, in<module>
sim.run(1)
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/simulation.py", line 562, in run
self._cpp_sys.run(steps_int, write_at_start)
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 317, in act
self._write_row(output_dict)
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 296, in _write_row
self.delimiter.join(
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 297, in<genexpr>
(self._fmt(data[k], headers[k]) forkin headers)))
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 97, in __call__
return self.format_num(value, column_width)
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 122, in format_num
min_len_repr = self._digits_from_decimal(value) + 1
File "/Users/mtimc/mambaforge/lib/python3.10/site-packages/hoomd/write/table.py", line 102, in _digits_from_decimal
digits = int(log10(abs(num)))
ValueError: math domain error
Expected output
No errors.
Platform
CPU, macOS
Installation method
Conda package
HOOMD-blue version
4.2.0
Python version
3.10.12
The text was updated successfully, but these errors were encountered:
Description
The recent fixes to the table writer for small values leads to a domain error when trying to write 0 because of the
log10
call in the_digits_from_decimal
function.Script
Input files
No response
Output
Expected output
No errors.
Platform
CPU, macOS
Installation method
Conda package
HOOMD-blue version
4.2.0
Python version
3.10.12
The text was updated successfully, but these errors were encountered: