py-motmetrics icon indicating copy to clipboard operation
py-motmetrics copied to clipboard

A BUG caused by pandas.Index.map

Open zhaozp15 opened this issue 1 year ago • 0 comments

In MOTAccumulator.merge_event_dataframes (Line 443), we use copy.index.map to update index. When copy is an empty DataFrame, the size of copy.index is 0. In this situation, copy.index.map will return an object of type Index rather than MultiIndex.

We can fix it by adding if copy.index.size != 0 before copy.index.map

zhaozp15 avatar Aug 02 '23 07:08 zhaozp15