-
Notifications
You must be signed in to change notification settings - Fork 39
[RFC] Some clarifications for plotting code #238
base: master
Are you sure you want to change the base?
Conversation
PEP8 doesn't seem to be clear on how this should be indented. However I feel pretty sure that breaking lines inside a destructuring expression (i.e. after the comma here) would be confusing to the majority of programmers.
I don't really understand this code but AFAICT you can plot the same column from multiple traces, i.e. len(columns) == 1 and len(traces) != 1. Not sure what role templates has here.
These two params have equivalent roles for plotting traces and DataFrames respectively. Move them next to each other in the docstring to make it more likely that users will notice this symmetry and understand the API.
- Rename `val` to `count`. This variable is a cadinality i.e. the length of a list. To me, `val` suggests an element of a list. - Add to docstring to explain intention of the function
LGTM and thanks for this! |
TODO is the following correct? | ||
Permute( | ||
Len[traces] != 1 | ||
Len[columns] = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is correct and should work when the same column is present in all the events (templates). I agree templates was a really bad name for the variable :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I'll remove the "TODO" and amend. I've figured out what templates
is (I think it's explained in another function) so perhaps I can add a comment for that too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, shouldn't templates
have length 1 here? I.e. you have multiple traces; if they're DataFrames that all have a certain column then columns
should have length 1, and if they're FTraces that all have a certain event then templates
should have length 1?
6f40d93
to
a84dd23
Compare
…-change Executor & LisaTest interface change
Since ruamel.yaml issue ARM-software#238 is partially resolved, this code does not break the deserialization anymore.
Avoid using __setstate__ for now on recursive structures
I've been confused a few times while using the plotting code. This is a set of docstrings and cleanups that I made while trying to understand it. I've marked this RFC because:
So I guess consider this low-priority :)