Skip to content
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

return types changed in watershed #68

Open
k-dominik opened this issue Apr 5, 2023 · 3 comments
Open

return types changed in watershed #68

k-dominik opened this issue Apr 5, 2023 · 3 comments

Comments

@k-dominik
Copy link
Contributor

ws = ws.astype("uint64")

Heya, just curious as to why the return type here has changed. I think vigra (which is used internally) will always return uint32 and that way it was easy to "remain" in the vigra regime. Now one has to cast again. Are you working on replacing vigra for the watershed?

Cheers
D

@constantinpape
Copy link
Owner

I have been using the output in some cases where uint32 might not be sufficient (i.e. ids > 4 billion), in order to avoid subtle issues I changed it here.

@k-dominik
Copy link
Contributor Author

Hey thanks for the clarification. Do you think it would be possible to add a flag to this function to retain the original behavior? I'd like to avoid having to copy the data twice around.

@constantinpape
Copy link
Owner

Do you think it would be possible to add a flag to this function to retain the original behavior?

Sure. I see two options: either add a flag, or add an argument that specifies the output dtype (and that defaults to uint64 so that the current behavior is the standard).

What would you prefer?

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

No branches or pull requests

2 participants