Closed dependabot[bot] closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.6%. Comparing base (
4882eea
) to head (f9a2190
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@vprusso We need to undo this and work on fixing the failures. I noticed they popped up in another PR.
Screenshot from this PR.
We could use #645 or #638 to fix these failures.
My bad! I was under the impression that some changes in numpy were impacting the docs to make 0.0
not equal to np.float(0.0)
, etc. If either of those diffs would fix the failures, let me get to reviewing those when ready and we can merge those in. Thanks, @purva-thakre !
Hmm, it's not actually clear to me why these failures are occurring. Is this perhaps some type of numpy 2.0
-specific issue?
Hmm, it's not actually clear to me why these failures are occurring
Me neither. I think it might be better to undo this merge and the dependabot ones following this one.
I just created a new local environment for python3.12. pytest toqito/
failed with errors. I don't understand why we didn't see the same behavior in this PR.
(CVXPY) Jul 02 07:13:58 PM: Encountered unexpected exception importing solver CVXOPT:
ImportError('libopenblas.so.0: cannot open shared object file: No such file or directory')
(CVXPY) Jul 02 07:13:58 PM: Encountered unexpected exception importing solver GLPK:
ImportError('libopenblas.so.0: cannot open shared object file: No such file or directory')
(CVXPY) Jul 02 07:13:58 PM: Encountered unexpected exception importing solver GLPK_MI:
ImportError('libopenblas.so.0: cannot open shared object file: No such file or directory')
I don't see the same behavior for a python3.11 environment.
Hmm, it's not actually clear to me why these failures are occurring. Is this perhaps some type of
numpy 2.0
-specific issue?
Yup, it is. The default integer type has been changed and np.int
has been deprecated for a while.
I tested out an example in channel_props/choi_rank
. Doctest expects the output to be np.int64(4)
. Using int(choi_rank(kraus_ops))
gives the expected output of 4. This feels like an easier workaround. WDYT?
If I use np.int(choi_rank(kraus_ops))
, it fails due to
----> 1 np.int(choi_rank(kraus_ops))
File ~/anaconda3/envs/toqito_env/lib/python3.11/site-packages/numpy/__init__.py:394, in __getattr__(attr)
389 warnings.warn(
390 f"In the future `np.{attr}` will be defined as the "
391 "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
393 if attr in __former_attrs__:
--> 394 raise AttributeError(__former_attrs__[attr])
396 if attr in __expired_attributes__:
397 raise AttributeError(
398 f"`np.{attr}` was removed in the NumPy 2.0 release. "
399 f"{__expired_attributes__[attr]}"
400 )
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Will add more to this as I make my way through the other failures.
Updates the requirements on numpy to permit the latest version.
Release notes
Sourced from numpy's releases.
... (truncated)
Commits
1d49c7f
Merge pull request #26698 from charris/prepare-2.0.02103511
DOC: Remove duplicate in author list.db8030e
BUG: Change cibuildwheel version [wheel build]1a68264
REL: Prepare for the NumPy 2.0.0 release [wheel build]c8665ba
Merge pull request #26696 from charris/backport-26582103f4dd
Merge pull request #26697 from charris/backport-25963c193dcd
Merge pull request #26695 from charris/backport-266678fa8191
BUG: Fix bug in numpy.pad() (#25963)ece3559
BUG: weighted nanpercentile, nanquantile and multi-dim q (#26582)b31e195
BUG: Adds asanyarray to start of linalg.cross (#26667)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show