Skip to content
This repository was archived by the owner on Nov 26, 2021. It is now read-only.
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions trappy/plotter/Constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ class ConstraintManager(object):


:param traces: Input Trace data
:type traces: :mod:`trappy.trace.BareTrace`, list(:mod:`trappy.trace.BareTrace`)
(or a class derived from :mod:`trappy.trace.BareTrace`)
:type traces: a list of :mod:`trappy.trace.BareTrace` (or derived class),
or :mod:`pandas.DataFrame` or a single instance of them.
:param columns: The column values from the corresponding
:mod:`pandas.DataFrame`
:type columns: str, list(str)
Expand Down Expand Up @@ -276,12 +276,17 @@ def _expand(self):
Len[columns] != 1
Len[templates] != 1
)

TODO is the following correct?
Permute(
Len[traces] != 1
Len[columns] = 1
Copy link
Collaborator

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 :(

Copy link
Contributor Author

@bjackman bjackman Feb 20, 2017

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 :)

Copy link
Contributor Author

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?

Len[templates] != 1
)
"""
min_len = min(self._lens)
max_pos_comp = [
i for i,
j in enumerate(
self._lens) if j != self._max_len]
i for i, j in enumerate(self._lens) if j != self._max_len]

if self._max_len == 1 and min_len != 1:
raise RuntimeError("Essential Arg Missing")
Expand Down