Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unspecified dimensionality in shape #51

Merged
merged 9 commits into from
Jul 14, 2024

Conversation

MilanStaffehl
Copy link
Owner

@MilanStaffehl MilanStaffehl commented Jul 14, 2024

Closes #9
Closes #27

Split module `_numpy_types` into a module for typing only and a
module for pydantic validation only.
Bind shape to tuple of int of indetermined size instead of a
tuple with unspecified type parameter tuples.

Closes #27
Add test for type checking arrays annotated to have indeterminate
shape with `tuple[int, ...]`
BREAKING CHANGE: Remove type alias `Shape` for `tuple`.
Add support for pydantic validation of arrays typed to have shape
with indetermined dimensionality using `tuple[int, ...]`, tuples
with literal integers and ellipsis, and tuples with new types as
first entry and ellipsis.
- Shape is removed, tuple is used instead
- Section about indeterminate size
@MilanStaffehl MilanStaffehl added feature: validation New feature for array validation feature: typing New feature for array typing labels Jul 14, 2024
@MilanStaffehl MilanStaffehl added this to the 0.2.0 milestone Jul 14, 2024
@MilanStaffehl MilanStaffehl self-assigned this Jul 14, 2024
@MilanStaffehl MilanStaffehl linked an issue Jul 14, 2024 that may be closed by this pull request
@MilanStaffehl MilanStaffehl merged commit 2ad0ff5 into main Jul 14, 2024
2 checks passed
@MilanStaffehl MilanStaffehl deleted the allow-unspecified-dimensionality branch July 14, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: typing New feature for array typing feature: validation New feature for array validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the type vars for shape Allow unspecified dimensionality with Shape[int, ...]
1 participant