Extend `Data.__contains__` to evaluate subarray presence
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 150
- Forks
- 23
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 2
Description
Presently Data.__contains__ only tests whether scalars are contained within a given data array, but the method could be extended to become more general, namely to check for the membership of sub-arrays, with agreed behaviour for selected cases. Assuming, and when, Python array standards such as numpy support this, we agreed to re-consider the scope of __contains__ in this manner.
See https://github.com/NCAS-CMS/cf-python/pull/320#discussion_r806373432 for context and brief discussion.
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 by locating Data.contains and read the linked pull request discussion for the proposed scope. Compare the agreed behavior with the relevant Python and NumPy array-membership standards; done means the selected subarray cases are supported consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100