Internal gufunc names accepted as estimator with backend="numba"

Open Beginner friendly
#164 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by locating the estimator validation used by the Numba backend and compare it with the array path, which already rejects these internal names. Check the validation for es_ensemble, vs_ensemble, gksuv_ensemble, and gksmv_ensemble; done means each listed internal name raises the usual ValueError with backend="numba" instead of reaching a gufunc and raising TypeError.

Written by the indexing model from the issue text.

Description

bug

With backend="numba", the estimator check accepts the keys used internally for the outcome- and vertically re-scaled gufuncs, which then fail with a confusing TypeError instead of the usual ValueError.

obs, fct = np.random.randn(2, 3), np.random.randn(2, 5, 3)
sr.es_ensemble(obs, fct, estimator="ownrg", backend="numba")
# TypeError: Too few arguments for function '_owenergy_score_gufunc'

The same happens for vrnrg in es_ensemble, ownrg in vs_ensemble, and ow/vr in gksuv_ensemble and gksmv_ensemble. The array path rejects them correctly.

Dominant language
Python
Stars
108
Forks
15
Avg merge
1h 42m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from frazane/scoringrules

All issues in frazane/scoringrules

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.