Skip to content

feat(sharding): lift constraint on evenly divisible subchunk shapes#370

Open
LDeakin wants to merge 1 commit intozarr-developers:mainfrom
LDeakin:sharding_lift_constraint
Open

feat(sharding): lift constraint on evenly divisible subchunk shapes#370
LDeakin wants to merge 1 commit intozarr-developers:mainfrom
LDeakin:sharding_lift_constraint

Conversation

@LDeakin
Copy link
Member

@LDeakin LDeakin commented Dec 3, 2025

@normanrz
Copy link
Member

normanrz commented Dec 4, 2025

Thanks! I can see the rationale of this change for the rectilinear chunk grid. However, I would favor keeping the strict requirement for regular outer chunk grids. That way, implementations that don't implement the rectilinear grid won't need to change.

@LDeakin
Copy link
Member Author

LDeakin commented Dec 4, 2025

I would favor keeping the strict requirement for regular outer chunk grids. That way, implementations that don't implement the rectilinear grid won't need to change.

I'm interested to hear more perspectives here. Personally, I think this change is very useful with regularly gridded arrays, and irregular grids just make the problem far more apparent. For example, say a chunk shape is constrained by a sensor or data pipeline and must be [997, 997, 997]. Well, the inner chunk shape can only be [1, 1, 1] because 997 is prime.

Would it be sufficient in your view to recommend that implementations that add support for this issue a warning that it will not be supported by impls that only support version 1.0 of the sharding codec?

@d-v-b
Copy link
Contributor

d-v-b commented Dec 4, 2025

+1 to this change, it seems like a logical extension of how we currently handle the shape / chunk grid relationship for the regular chunk grid.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments