pymc-devs / pymc-devs/pytensor
Switch Unique behavior from numpy < 2.0 to numpy >= 2.0
Open
Nobody has claimed this yet.
maintenance
NumPy compatibility
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
Description
The behavior changed regarding the shape of return_inverse. We patched our perform mode to behave like the old numpy, but we should change it now that we are only compatible with numpy 2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pytensor/tensor/extra_ops.py at lines 1229-1242 and inspect the Unique perform-mode handling for return_inverse. Compare that behavior with NumPy 2.0 and confirm that the resulting inverse shape matches the NumPy 2.0 behavior; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100