Python icon indicating copy to clipboard operation
Python copied to clipboard

Fix coordinate compression bug

Open prsai0110 opened this issue 2 months ago • 0 comments

This pull request resolves issue #13226 by ensuring consistent behavior when handling missing values in coordinate_compression.py.

Changes made:

  • compress(value) now raises a ValueError if the value is not found in the coordinate map.
  • decompress(index) raises a ValueError for out-of-bounds indices.
  • Added docstrings and doctests to clarify expected behavior.
  • Verified changes using pytest and doctest.

Pull Request Checklist:

  • I have read CONTRIBUTING.md.
  • I have followed the formatting guidelines in the code style guide.
  • I have added relevant tests.
  • I have added documentation to all new and modified functions.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have used Python's typing annotations.

prsai0110 avatar Nov 07 '25 06:11 prsai0110