Skip to content

rename array cls -> dtype, accept str or np.dtype#32

Merged
wpbonelli merged 4 commits intodevelopfrom
array-dtype
Oct 23, 2025
Merged

rename array cls -> dtype, accept str or np.dtype#32
wpbonelli merged 4 commits intodevelopfrom
array-dtype

Conversation

@wpbonelli
Copy link
Owner

Update the array field decorator signature array(cls, ...) -> array(dtype, ...) where dtype can now be a str, np.dtype, or type as before. if a type then we use np.object_ dtype as before. Strings are passed to np.dtype(), this works for e.g. fixed-length string formats. Obviously dtype itself is allowed too. And if a dtype is provided, enforce it at init/modification time. Add tests.

Also remove some unnecessary behavior where list type hints were allowed for the array field decorator.

@wpbonelli wpbonelli merged commit cfcd927 into develop Oct 23, 2025
22 checks passed
@wpbonelli wpbonelli deleted the array-dtype branch October 23, 2025 16:48
@wpbonelli wpbonelli mentioned this pull request Oct 23, 2025
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.

1 participant