Skip to content

do we need the ChunkCoords type #3373

Closed

Description

@d-v-b

IMO ChunkCoords is not really a usability upgrade over tuple[int, ...], and we use ChunkCoords for lots of non-chunk-coordinate related stuff, like shapes.

I propose removing ChunkCoords in favor of tuple[int, ...]. If we have places in the codebase where we want to carefully distinguish between tuples of ints with different meanings, maybe we can use a NewType for this.

Activity

  1. TomNicholas commented on Aug 13, 2025

    @TomNicholas
    Member

    use ChunkCoords for lots of non-chunk-coordinate related stuff, like shapes.

    I also found this really confusing and was intending to complain about it. But I'm not sure if it would be better to just have separate types that both represent tuple[int, ...].

  2. dcherian commented on Aug 13, 2025

    @dcherian
    Contributor

    Yes NewType is definitely the way. The tuple[int, ...] applies to shard shape, chunk shape, and array shape, so a few NewType could be a better approach

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