numpy / numpy/numtype

Shape-typing in `numpy.memmap`

Open
#126 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stubs: Enhancement topic: shape-typing
Dominant language
Python
Stars
79
Forks
8
PR merge metrics
No merged PRs in 30d

Description

The generic shape-type parameter is currently always Any. Within the constructor it should be "assigned" a tuple of just int (no literals).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the numpy.memmap constructor in the Python typing stubs and inspect its generic shape-type parameter. Update the representation so the shape is a tuple containing int rather than Any, with no literal values, then verify the resulting typing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.