stub for sklearn.datasets.load_iris is missing a return type option
Chưa có ai nhận issue này.
Đá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
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Search the sklearn.datasets stubs for the load_iris entry point and compare its return annotation with the linked documentation. Update the annotation to represent the return_X_y alternatives, then run the repository’s stub or type-check validation if available; it is done when both documented return forms are represented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Returns section of the docstring for sklearn.datasets.load_iris() has two options:
- An
sklearn.utils.Bunch, ifreturn_X_yisFalse - A
tuple[ndarray, ndarray]ifreturn_X_yisTrue
The type stub for the function is
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> tuple[Bunch, tuple]: ...
but I believe it should be:
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> Bunch | tuple[ndarray, ndarray]: ...
or at least:
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> Bunch | tuple: ...
which might be all we can get with parsing.
This might not be the only case of this in the codebase, but unfortunately I just have enough time to write this ticket. Normally I like to come with a bit more information, sorry about that.
- Ngôn ngữ chính
- Python
- Star
- 304
- Fork
- 104
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 microsoft/python-type-stubs
-
Maintenance Status Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/python-type-stubs#395 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
microsoft/python-type-stubs#392 ·
-
Inconsistent naming of stubs Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/python-type-stubs#315 · 1 bình luận ·
-
Unparameterized `np.ndarray` typings produce "Type of ... is partially unknown" Pyright type errors. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/python-type-stubs#309 · 4 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoft/python-type-stubs#211 · 8 bình luận · 29 reaction ·
Tất cả issue của microsoft/python-type-stubs
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
zilliztech/memsearch#759 ·