[rasterio] numpy arrays in transform.xy, a crs of None, and read(masked=True)
メンテナーはふだん 1 日以内に返信
@omkhpb25 がすでに取り組んでいます。
2026年10月21日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 5.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 7分
- マージ済み PR(30日)
- 116
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/typeshed のほかの issue
-
`networkx.set_edge_attributes` should support scalar value + name対応中かも @Fire162 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
false alarm on decode call対応中かも @jw9829 が 36 日前に担当しました。 オープンhelp wanted stubs: false positive
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
python/typeshed#16441 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Don't run pyright basic checks on projects with strict pyright settings in CI対応中かも @Mohith1612 が 73 日前に担当しました。 オープンproject: infrastructure
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python/typeshed#16005 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
stubs: improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python/typeshed#15548 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
stubs: improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
python/typeshed#15529 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
python/typeshed の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/sagemaker-python-sdk#6554 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
huggingface/diffusers#15170 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] LLM conflict check ignores MNEMOSYNE_LLM_MAX_TOKENS, so reasoning models return empty repliesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mnemosyne-oss/mnemosyne#1325 ·
メンテナーはふだん 1 日以内に返信
-
enhancement meshtastic-2.8
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pskillen/meshflow-api#459 ·