Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using merge with unhashable type TimeSeries problematic #101

Open
vlsd opened this issue Feb 28, 2017 · 0 comments
Open

Using merge with unhashable type TimeSeries problematic #101

vlsd opened this issue Feb 28, 2017 · 0 comments

Comments

@vlsd
Copy link
Contributor

vlsd commented Feb 28, 2017

Try the following:

ts_a = traces.TimeSeries(default=traces.Histogram({0:1}))
ts_b = traces.TimeSeries(default=traces.Histogram({0:1}))
traces.TimeSeries.merge([ts_a, ts_b])

and it will result in

/traces/traces/timeseries.py in merge(cls, ts_list, compact, operation, default)
    681
    682         if default is None:
--> 683             unique_defaults = set(ts._default for ts in ts_list)
    684             default = unique_defaults.pop()
    685             if unique_defaults:

TypeError: unhashable type: 'Histogram'

Do the following instead, and it will work:

traces.TimeSeries.merge([ts_a, ts_b], default=traces.Histogram())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant