Skip to content

Allow mean pixel value inference from int arrays, not just float#220

Merged
jni merged 6 commits intojni:mainfrom
TimMonko:pixel-values-of-int-arrays
Oct 30, 2023
Merged

Allow mean pixel value inference from int arrays, not just float#220
jni merged 6 commits intojni:mainfrom
TimMonko:pixel-values-of-int-arrays

Conversation

@TimMonko
Copy link
Copy Markdown
Contributor

  1. Now only passes None to self.pixel_values i ncsr.py if subdtype is np.bool_ rather than only collecting pixel_values when subdtype is np.float_ allowing for pixel_values to be obtained from int and uint images.
  2. add skeletonlabel to _testdata.py to have an example int array
  3. add test_skeletonlabel to test_csr.py to confirm int array behaves as expected with csr.summarize

* only pass None to self.pixel_values i ncsr.py if subdtype is np.bool_ rather than only collecting pixel_values when subdtype is np.float_ allowing for pixel_values to be obtained from int and uint images.
* add skeletonlabel to _testdata.py to have an example int array
* add test_skeletonlabel to test_csr.py to confirm int array behaves as expected with csr.summarize
@TimMonko
Copy link
Copy Markdown
Contributor Author

TimMonko commented Oct 28, 2023

Good news,: I figured out how to run pytest independently of whatever cookie cutter has helped me in the past. Bad news: I realize my changes don't pass. So I'll work on this some more to sort it out!

@TimMonko
Copy link
Copy Markdown
Contributor Author

Should be good to go now. Old tests pass, as does the new test.

@jni
Copy link
Copy Markdown
Owner

jni commented Oct 30, 2023

Brilliant, thank you! I had to push some dependency fixes because of pydantic v2 so that the tests would run on CI, but this is ready as far as I'm concerned, will merge! Thanks! 🚀

@jni jni changed the title allowing mean pixel value inference from int arrays Allow mean pixel value inference from int arrays, not just float Oct 30, 2023
@jni jni merged commit e248c51 into jni:main Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants