-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes following pandas 2 #327
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
- Coverage 83.34% 83.34% -0.01%
==========================================
Files 161 161
Lines 12359 12355 -4
==========================================
- Hits 10301 10297 -4
Misses 2058 2058
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 28 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -211,12 +211,12 @@ def tracking(cells_id, cells_id_prev, labels, V1, max_ID): | |||
size.append(len(x)) | |||
biggest = np.argmax(size) | |||
new_ID = new_ID[biggest] | |||
cells_id_new.ID.iloc[ID] = new_ID | |||
cells_id_new.loc[index, "ID"] = new_ID |
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.
using .loc[index, "ID"]
instead of .ID.iloc[ID]
avoids the warning by removing the chaining operation. In this case, .loc
should be more suited than .iloc
since index
refers to the index label and not the index position (although the two are in fact the same value...).
Minor adjustments following the release of pandas 2:
tdating.py
usepd.concat
instead ofpd.DataFrame().append
which was effectively removed (ref).salscores.py
: Division by zero returns-inf
,nan
, orinf
depending on the numerator, instead of raising (but I wasn't able to understand exactly the root cause of this breaking change...)Additionally,