Skip to content

convert integers indexes to int32 #187

Description

@giovp

this is cause there is no signed int64 in javascript. Check https://github.com/gzuidhof/zarr.js/blob/1002181a4c6b5411e20fe2bd54533a4c75b4bbcc/src/nestedArray/types.ts#L39-L67

this should happen at anndata and shapes/points level

Activity

  1. Bisaloo commented on May 21, 2026

    @Bisaloo

    FWIW, R doesn't have int64 either.

    When reading Zarr data with int64, we internally convert it to int32 if the max doesn't exceed what can be stored int32. Using int32 out of the box where possible would slightly improve performance for us as we wouldn't have to convert them.

  2. LucaMarconato commented on May 21, 2026

    @LucaMarconato
    Member

    Thanks for reporting. We could use this helper function

    def _get_uint_dtype(value: int) -> str:

    Related: in reworking with dtypes we should also relax this unnecessary constraint:

    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions