Report
Handle cases explicitly for KeyError or ValueError in _make_tiles. For example in
|
def _get_primary_coordinate_system(element: SpatialElement) -> str | None: |
|
"""Return the first available coordinate system, preferring 'global'.""" |
|
try: |
|
transformations = get_transformation(element, get_all=True) |
|
except (KeyError, ValueError): |
|
return None |
|
if not transformations: |
|
return None |
|
# Prefer 'global' if present |
|
if "global" in transformations: |
|
return "global" |
|
return next(iter(transformations.keys())) |
Seperating this issue to speed up development
Report
Handle cases explicitly for
KeyErrororValueErrorin_make_tiles. For example insquidpy/src/squidpy/experimental/im/_make_tiles.py
Lines 840 to 851 in d4f256f
Seperating this issue to speed up development