[rasterio] numpy arrays in transform.xy, a crs of None, and read(masked=True)
Maintainer thường phản hồi trong vòng 1 ngày
@omkhpb25 đang làm issue này rồi.
Từ ngày 21/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 5.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 7 phút
- Pull request đã merge (30 ngày)
- 116
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python/typeshed
-
`networkx.set_edge_attributes` should support scalar value + nameCó thể đã có người làm @Fire162 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
false alarm on decode callCó thể đã có người làm @jw9829 đã nhận 37 ngày trước. Đang mởhelp wanted stubs: false positive
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
python/typeshed#16441 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Don't run pyright basic checks on projects with strict pyright settings in CICó thể đã có người làm @Mohith1612 đã nhận 73 ngày trước. Đang mởproject: infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
python/typeshed#16005 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stubs: improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
python/typeshed#15548 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stubs: improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
python/typeshed#15529 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của python/typeshed
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
elviskahoro/sdk-python-attio#144 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RenyiELBO raises TypeError when model has no sample sitesCó thể đã có người làm @alibb007 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày