Variogram scores fail on the array path with a per-sample p

Aperta
#174 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
numpy, python
Ambito
testing

Direzione di ricerca

Start at vs_ensemble and compare how the array and numba backends handle p with shape (N,); the example in the issue reproduces the mismatch. Check the variogram score tests and add coverage for per-sample p on both backends. Done means both backends support the input or reject it with a clear, consistent message.

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

Descrizione

bug

The variogram scores accept an array-valued p of shape (N,) on the numba path, but the array path fails with a broadcast error. Either both paths should support it or both should reject it with a clear message.

import numpy as np
import scoringrules as sr

rng = np.random.default_rng(0)
obs, fct = rng.normal(size=(3, 2)), rng.normal(size=(3, 5, 2))
p = np.array([0.5, 1.0, 2.0])
sr.vs_ensemble(obs, fct, p=p, backend="numba")  # works
sr.vs_ensemble(obs, fct, p=p)                   # ValueError: operands could not be broadcast together
Lingua principale
Python
Stelle
108
Fork
15
Merge medio
2h
PR unite (30g)
19

Preparare l'ambiente

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 frazane/scoringrules

Tutte le issue di frazane/scoringrules

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.