Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

RFC: specify expected behavior for `matrix_norm` and `vector_norm` when provided an empty array

Aperta
#901 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Leggi le voci della specifica per matrix_norm e vector_norm, quindi esamina la pull request collegata di NumPy e l’issue #232 di Array API come precedente. Il lavoro è completato quando la RFC arriva a una decisione e la specifica registra esplicitamente il comportamento per gli input vuoti nei casi ord e p indicati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

RFC

It would be useful for the specification to state the expected result of an empty norm (related to the discussion in https://github.com/numpy/numpy/pull/28343)

In https://github.com/data-apis/array-api/issues/232, it was decided that sum and prod of empty arays should return 0 and 1 respectively, as these are the additive and multiplicative identites, and for min and max to leave the behavior explicitly undefined.

If we extend this logic to matrix_norm, it implies that for ord='fro' or ord='nuc', the result for an empty matrix should be 0.0, and for other values of ord the behavior is undefined.

Extending this logic to vector_norm, it implies that for an empty vector the p-norm should be 0.0 for positive p; the correct behavior for negative and infinite p are less clear to me.

Lingua principale
Python
Stelle
281
Fork
52
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di data-apis/array-api

Tutte le issue di data-apis/array-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.