-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
On forager object creation through the call to dataObject.__init__(), the foragersDF.forager.unique() array is implicitly assumed to be equal to range(len(foragersDF.forager.unique()). This behaviour is
- not documented
- undesirable in many practical situations when
foragersDFis by itself a slice of a larger dataframe, in which case only a handful of foragers are present. - Is not explicitly checked at object creation, which causes great many issues afterwards.
The ideal solution should be to allow arbitrary non-consecutive indices at object creation and either reindex them right away, or keep track of internal indices vs. actual labels. In any case, any such assumption should be documented and asserted in code, together with a test case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed