Open
Description
I just had to compare many sessions and naturally put them in a dict of sessions, then wanted to compare them and tried compare(dict_of_sessions)
but it does not work (compare(dict_of_arrays)
does not work either) but the workaround felt very clunky:
compare(*dict_of_arrays.values(), names=list(dict_of_arrays.keys()))
compare(*dict_of_sessions.values(), names=list(dict_of_sessions.keys()))
- the fact you have to pass values and names separately is annoying
- the difference between *args for values and a single list argument of names is odd/surprising
- the fact that names only accepts lists and not tuples or dictkeyview is the icing on the cake
On the other hand, I know that forever expanding the API is not a good idea, but I see this akin to what we support for rename, set_labels etc.
Maybe we should deprecate the names= argument of compare (and possibly even the *args syntax) and instead replace it with:
compare(obj1, obj2=None)
which we could thus call either:
compare(obj1, obj2)
compare(dict)