pymc-devs / pymc-devs/pytensor
CDataTypeConstant.signature() is wrong, merge_signature override shouldn't be needed
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
CDataTypeConstant has an inconsistency between signature() and merge_signature():
Why can't signature() be (self.type, id(self.data)), which would make the merge_signature() override unnecessary.
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 with the linked CDataTypeConstant implementation in pytensor/link/c/type.py and compare its signature() with merge_signature(). Read the related signature handling in pytensor/graph/basic.py. Done means the two paths are consistent without the unnecessary override, with the relevant test suite still passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100