Skip to content

Conversation

@Nirkan
Copy link

@Nirkan Nirkan commented Dec 14, 2025

Describe your changes
An empty mask np.zeros((100, 100)) without specifying dtype=np.uint8 fails and causes error. The bugfix returns the copy of original mask if its an empty mask.

Type of update
Is this a:

  • Bug fix

Associated issues
Avoid fatal errors and instead just pass an empty mask as return #1742

Additional context
This is one part of the issues in #1742 and the fix is similar to #1811

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

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@deepsource-io
Copy link

deepsource-io bot commented Dec 14, 2025

Here's the code health analysis summary for commits cf15e46..715ac87. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗

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

@Nirkan Nirkan changed the title Fix/issue 1742 threshold otsu Add emtpy mask handling within threshold.otsu Dec 14, 2025
@nfahlgren nfahlgren added enhancement Enhancements to existing features ready to review labels Dec 23, 2025
@github-project-automation github-project-automation bot moved this to Pull Requests in PlantCV4 Dec 23, 2025
@nfahlgren nfahlgren added this to the PlantCV v4.11 milestone Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancements to existing features ready to review

Projects

Status: Pull Requests

Development

Successfully merging this pull request may close these issues.

3 participants