danforthcenter / plantcv

Plant phenotyping with image analysis
Mozilla Public License 2.0
665 stars 265 forks source link

Fix casting issues that trigger NumPy deprecation warnings #1564

Closed nfahlgren closed 4 months ago

nfahlgren commented 4 months ago

Describe your changes In NumPy 1.25, casting single value arrays to Python data types is deprecated. In general this PR extracts the single value before casting to fix the issue (or avoids casting when unnecessary).

Type of update Is this a: cleanup

Associated issues

1566

For the reviewer See this page for instructions on how to review the pull request.

deepsource-io[bot] commented 4 months ago

Here's the code health analysis summary for commits 76cd4a1..e49f15d. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%, ✅ Above Threshold100%, ✅ Above Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.