NVIDIA / NVIDIA/cuda-python

[DOC]: C API doc strings don't always make sense with python bindings

Offen
#721 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

blocked cuda.bindings documentation enhancement
Vorherrschende Sprache
Cython
Sterne
3.4k
Forks
329
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
116

Beschreibung

Is this a duplicate?
Is this for new documentation, or an update to existing docs?

Update

Describe the incorrect/future/missing documentation
Image cuda-bindings turns some c api arguments into returns, and yet it still reuses C API doc strings that don't make sense. See e.g. on enclosed screenshot, `from and to may both be NULL`, but user doesn't control `from` and `to` so user cannot set them to NULL. There's also broken formatting where things that should not be italicized are italicized. The doc should be something like "if numEdges is 0, `to` and `from` are returned as empty lists, and the function only returns the number of edges in `numEdges`. Otherwise, `to` and `from` will have `numEdges` entries" NULL also doesn't make sense in python context.
If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Python-seitige Dokumentation zu finden, die die im Screenshot gezeigten C-API-Strings wiederverwendet, und vergleiche anschließend ihre Parameter- und Rückgabebeschreibungen mit dem Verhalten des Bindings. Erledigt ist die Aufgabe, wenn die betroffenen Dokumente zurückgegebene Listen und Python-Werte statt benutzergesteuerter C-Argumente oder NULL beschreiben und die Formatierung korrigiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.