Temporary patch for skimage ArrayMap's read-only issues#260
Closed
n-wbrown wants to merge 2 commits intoroyerlab:mainfrom
Closed
Temporary patch for skimage ArrayMap's read-only issues#260n-wbrown wants to merge 2 commits intoroyerlab:mainfrom
n-wbrown wants to merge 2 commits intoroyerlab:mainfrom
Conversation
Author
|
See #252 for details. This will eventually be fixed by the skimage fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
First of all, thank you for all your hard work on ultrack and for making it freely available. It's a terrific tool and is really helping out with the research I'm working on.
I've encountered an issue with running
trackon my laptop but I've also put together a small fix for it. In short, passing read-only arrays to skimage's Arraymap inmip_solver.pycauses Arraymap to throw exceptions. The skimage community recognizes the issue (scikit-image/scikit-image#6378) and the underlying cause appears to be cython. While the community did fix the issue very recently (scikit-image/scikit-image#7535) on the main branch, these changes have not made it to a release yet. As skimage can take many months between releases, this pull was flagged for 0.27 release, and skimage 0.26 just released in December of 2025, I'm unsure how long we will need to wait for this fix to make it to an official skimage release.I recognize that there's a very similar PR right now (#252) being worked on by @JoOkuma and @macromeer. Given the similarity of these two PRs, feel free to close this one if it isn't deemed to be productive. There is a small difference in this one as I've fixed the issue by setting the writable flag of the numpy arrays to true rather than duplicating the arrays in memory.
Details on my system:
os: sequoia 15.7.3
chip: Apple M4
I've tested this in two environments, with these packages
Python: 3.12.8
cbc: stable 2.10.12 (bottled) (installed with brew)
numpy 2.3.5
scikit-image 0.26.0
ultrack 9a7084d
Python: 3.11.14
cbc: stable 2.10.12 (bottled) (installed with brew)
numpy 2.3.5
scikit-image 0.26.0
ultrack 0.7.1
When attempting to run
track(from ultrack import track) I encountered a number of errors like the one shown in the test below.The test suite, with no changes results in this:
With the changes: