[rasterio] numpy arrays in transform.xy, a crs of None, and read(masked=True)
I maintainer di solito rispondono entro 1 giorno
@omkhpb25 ci sta già lavorando.
Dal 21/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
The three problems are in the rasterio stubs bundled in typeshed: rasterio.transform.xy (the rows/cols parameters and return type), DatasetBase.crs, and DatasetReaderBase.read (the return type when masked=True). Reproduce each case with the snippets in the issue, then compare against the current stub signatures. Done means the stubs accept numpy arrays, allow crs to be None, and return a masked array type when masked=True, with the repository's stub tests passing. The issue asks for maintainer approval before a pull request, so confirm that first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Researched and drafted by Claude (Anthropic's AI model, in Claude Code), which also ran the measurements below; reviewed by @bjlittle before posting.
Type checking geovista against types-rasterio 1.5.2.20261005 turned up three places where the rasterio stubs are narrower than rasterio 1.5.2 at runtime.
-
rasterio.transform.xytypesrowsandcolsasint | Sequence[int], and its result astuple[float, float] | tuple[list[float], list[float]].rasteriotakes numpy arrays, and gives arrays back for them:import numpy as np from rasterio.transform import from_origin, xy transform = from_origin(10.0, 20.0, 1.0, 1.0) rows, cols = np.meshgrid(np.arange(2), np.arange(3), indexing="ij") xs, ys = xy(transform, rows.flatten(), cols.flatten()) type(xs) # <class 'numpy.ndarray'>An
ndarrayis not aSequence, so a caller passing one needs a cast. -
DatasetBase.crsis typedCRS, but a GeoTIFF without a CRS givesNone. -
DatasetReaderBase.readis typed to returnNDArray[Any]whatevermaskedis, but withmasked=Trueit returns anumpy.ma.MaskedArray, so using itsmaskdoesn't type check.
If any of these would be welcome as a pull request, Claude can prepare one the same way, for @bjlittle to review before it is opened.
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 5.1k
- Fork
- 2.1k
- Merge medio
- 2g 1h
- PR unite (30g)
- 115
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python/typeshed
-
`networkx.set_edge_attributes` should support scalar value + nameForse già presa @Fire162 l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
false alarm on decode callForse già presa @jw9829 l’ha presa 37 giorni fa. Apertahelp wanted stubs: false positive
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
python/typeshed#16441 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Don't run pyright basic checks on projects with strict pyright settings in CIForse già presa @Mohith1612 l’ha presa 74 giorni fa. Apertaproject: infrastructure
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
python/typeshed#16005 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
stubs: improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python/typeshed#15548 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
stubs: improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
python/typeshed#15529 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di python/typeshed
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
unionai-oss/pandera#2640 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
JdeRobot/RoboticsInfrastructure#843 ·
I maintainer di solito rispondono entro 1 giorno
-
automated endpoint-dead needs-curation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
almanac-data/climate-almanac#122 ·
I maintainer di solito rispondono entro 1 giorno
-
area:harness enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
evarness-ai/iris-harness#420 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
suitenumerique/find#206 ·
I maintainer di solito rispondono entro 2 giorni