-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from SINTEF/py3.12
Add Py3.12 to CI
- Loading branch information
Showing
6 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "cython", "numpy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Cython==0.29.33 | ||
numpy==1.24.2 | ||
Cython==3.0.8 | ||
numpy==1.26.4 | ||
pytest==6.2.5 | ||
pytest-benchmark==3.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import annotations | ||
|
||
from typing import SupportsFloat, Sequence, Protocol, SupportsIndex, Iterator, Any, TypeVar, List, overload, Union | ||
import numpy as np | ||
from numpy.typing import ArrayLike | ||
|
||
|
||
# T_co = TypeVar("T_co", covariant=True) | ||
|
||
|
||
# class Seq(Protocol[T_co]): | ||
# def __len__(self) -> int: ... | ||
# @overload | ||
# def __getitem__(self, index: SupportsIndex, /) -> T_co: ... | ||
# @overload | ||
# def __getitem__(self, index: slice, /) -> Seq[T_co]: ... | ||
# def __iter__(self) -> Iterator[T_co]: ... | ||
# def __contains__(self, x: Any) -> bool: ... | ||
# def __reversed__(self, /) -> Iterator[T_co]: ... | ||
# def count(self, value: Any, /) -> int: ... | ||
# def index(self, value: Any, /) -> int: ... | ||
|
||
|
||
# b: Seq[SupportsFloat] | ||
|
||
# a: ArrayLike = b | ||
|
||
f: float | ||
n: np.floating | ||
u: Union[float, np.floating] | ||
|
||
reveal_type(abs(f)) | ||
reveal_type(abs(n)) | ||
reveal_type(abs(u)) |