Skip to content

Use np.ndarray in generic types - #234

Merged
jl-wynen merged 1 commit into
mainfrom
py312-generic-compat-tests
Aug 18, 2026
Merged

Use np.ndarray in generic types#234
jl-wynen merged 1 commit into
mainfrom
py312-generic-compat-tests

Conversation

@jl-wynen

Copy link
Copy Markdown
Member

The previous npt.NDArray[...] clashes with typing.Generic coming from sciline.Scope. Functionally, there is no reason to inherit from or parametrise by npt.NDArray.

This fixes the immediate error in #233. This will not currently be tested with a version that triggers the failure because I do not want to add a new Python 3.12 test since we will soon drop support for 3.11 anyway.

The previous npt.NDArray[...] clashes with `typing.Generic` coming from `sciline.Scope`. Functionally, there is no reason to inherit from or parametrise by npt.NDArray.
@jl-wynen
jl-wynen requested a review from SimonHeybrock August 18, 2026 16:17
@jl-wynen
jl-wynen enabled auto-merge August 18, 2026 16:19
@jl-wynen
jl-wynen merged commit 56014f3 into main Aug 18, 2026
6 checks passed
@jl-wynen
jl-wynen deleted the py312-generic-compat-tests branch August 18, 2026 19:14
@SimonHeybrock

Copy link
Copy Markdown
Member

Thanks, should #233 be closed?

@jl-wynen

Copy link
Copy Markdown
Member Author

Thanks, should #233 be closed?

Depends on whether you want to figure out how to handle py3.12 generics. Or if we should just leave everything as is and accept that users can run into this error.

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