-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix deprecation warning for truth value of an empty array [all tests ci] #1450
Fix deprecation warning for truth value of an empty array [all tests ci] #1450
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1450 +/- ##
==========================================
+ Coverage 83.52% 85.32% +1.80%
==========================================
Files 64 72 +8
Lines 5686 6583 +897
==========================================
+ Hits 4749 5617 +868
- Misses 937 966 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@leewujung This one is ready for review |
Since the one fixed is under Also, I think the condition you tested for should output False? Since in this case, |
Actually, I was wrong, the parameters were saved differently in azfp and azfp6 format. The only thing I changed was to go from True to False. I am not sure if the below block is still needed -- seems better to remove? if all([np.isclose(self.parameters[p], 0) for p in params]):
return False |
Oops I messed this up. Will look again tomorrow. |
Ok, turns out that this is a bug from #1323 that the parameter checking was somehow moved to before the XML part of the file is parsed in Let me know what you think. |
@leewujung Ah good catch. I double checked and in no case do we end up with an empty array. I'll squash merge this now. |
Fixes deprecation warning which arose in the azfp6 parser when checking valid parameters for temperature and tilt which was discovered in #1444: