Skip to content

Inconsistent return types for scores #107

@simon-hirsch

Description

@simon-hirsch

Hi @frazane, @sallen12

I've noticed some inconsistent return types, e.g.

obs = np.ones(5)
fct = np.random.normal(size=(100, 5))

es = sr.es_ensemble(obs, fct)
dss = sr.dssmv_ensemble(obs, fct)

print(type(es), type(dss))

returns: <class 'numpy.float64'> <class 'numpy.ndarray'>.

The issue is a bit tricky, e.g. when doing stuff like:

df.loc[t, "dss"] = sr.dssmv_ensemble(obs, fct)

then you've got a series of arrays which needs post processing for storage and aggregation.

If I find some time in the next week I might start to do some digging, I suspect it is something in the numba backend/handling of array shapes there

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions