stub for sklearn.datasets.load_iris is missing a return type option
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- machine-learning
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 304
- Fork
- 104
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri 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 microsoft/python-type-stubs
-
Maintenance Status Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
microsoft/python-type-stubs#395 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
microsoft/python-type-stubs#392 ·
-
Inconsistent naming of stubs Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/python-type-stubs#315 · 1 commento ·
-
Unparameterized `np.ndarray` typings produce "Type of ... is partially unknown" Pyright type errors. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/python-type-stubs#309 · 4 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
microsoft/python-type-stubs#211 · 8 commenti · 29 reazioni ·
Tutte le issue di microsoft/python-type-stubs
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
use-agent-os/agent-os#3314 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BasedHardware/omi#15662 · 1 commento ·
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
AiursoftWeb/AnduinOS-2#19 ·