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

Pin numpy<2.2.0 (backport #649) #650

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 13, 2024

Summary

numpy 2.2.0 was released recently and it causes mypy errors as follows.
In order to merge existing PRs, I would like to pin numpy version first.
After we merge all existing PRs, we get back to these mypy errors.

I feel the error does not make sense because tuple[int, int] should be matched tuple[int, ...].

qiskit_optimization/converters/linear_inequality_to_penalty.py:218: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[Any]]", variable has type "ndarray[tuple[int, int], dtype[Any]]")  [assignment]
qiskit_optimization/converters/linear_inequality_to_penalty.py:221: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[Any]]", variable has type "ndarray[tuple[int, int], dtype[Any]]")  [assignment]
qiskit_optimization/converters/linear_inequality_to_penalty.py:227: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[Any]]", variable has type "ndarray[tuple[int, int], dtype[Any]]")  [assignment]
qiskit_optimization/converters/linear_equality_to_penalty.py:144: error: Argument 1 to "extend" of "list" has incompatible type "str"; expected "Iterable[float]"  [arg-type]
qiskit_optimization/converters/linear_equality_to_penalty.py:144: note: Following member(s) of "str" have conflicts:
qiskit_optimization/converters/linear_equality_to_penalty.py:144: note:     Expected:
qiskit_optimization/converters/linear_equality_to_penalty.py:144: note:         def __iter__(self) -> Iterator[float]
qiskit_optimization/converters/linear_equality_to_penalty.py:144: note:     Got:
qiskit_optimization/converters/linear_equality_to_penalty.py:144: note:         def __iter__(self) -> Iterator[str]
qiskit_optimization/algorithms/admm_optimizer.py:860: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], Any]", variable has type "ndarray[tuple[int], dtype[float64]]")  [assignment]
qiskit_optimization/algorithms/admm_optimizer.py:861: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], Any]", variable has type "ndarray[tuple[int], dtype[float64]]")  [assignment]
qiskit_optimization/algorithms/admm_optimizer.py:862: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], Any]", variable has type "ndarray[tuple[int], dtype[float64]]")  [assignment]
Found 7 errors in 3 files (checked 126 source files)

Details and comments


This is an automatic backport of pull request #649 done by [Mergify](https://mergify.com).

(cherry picked from commit a962c45)
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12316754275

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.857%

Totals Coverage Status
Change from base Build 11548057526: 0.0%
Covered Lines: 4446
Relevant Lines: 4788

💛 - Coveralls

@mergify mergify bot merged commit 011d3b9 into stable/0.6 Dec 13, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants