Skip to content

Bug: Inconsistent behavior for missing values in coordinate_compression.py #13226

@tommasobaiocchi

Description

@tommasobaiocchi

Repository commit

a0b0f41

Python version (python --version)

Python 3.10.7

Dependencies version (pip freeze)

Not applicable - this is a logical bug, not dependency-related

Expected behavior

Consistent behavior across all methods when handling missing values:

  • Either ALL methods should raise exceptions for invalid inputs
  • Or ALL methods should return consistent sentinel values
  • The behavior should be clearly documented
  • No silent failures mixed with exceptions

Actual behavior

Inconsistent behavior:

  1. compress(80) returns -1 (silent failure)
  2. coordinate_map[80] raises KeyError (exception)
  3. decompress(5) returns -1 (silent failure)

This mixed behavior can cause hard-to-debug issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions