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

intensity_limits would be a better name for dtype_limits #7295

Open
lagru opened this issue Jan 14, 2024 · 1 comment
Open

intensity_limits would be a better name for dtype_limits #7295

lagru opened this issue Jan 14, 2024 · 1 comment
Labels
🔽 Deprecation Involves deprecation 🧊 Backburner Low-priority issue 📜 type: API Involves API change(s) 🔧 type: Maintenance Refactoring and maintenance of internals

Comments

@lagru
Copy link
Member

lagru commented Jan 14, 2024

At a first glance I thought, dtype_limits(...) would give me the largest and lowest representable number of the dtype of a given image (like np.finfo() only for integers and floats). Though, the function actually returns our intensity conventions for a given dtype. So I propose to refactor the function:

@deprecate_function(...)
def dtype_limits(image, clip_negative=False):
    ...

# to

def intensity_limits(dtype, *, clip_negative=False):
    ...

I'm guessing that this function isn't used too much in our user base and the new name should make the functions purpose a lot clearer. I don't think this refactor needs to be a high priority but I'd like to eventually get to it. At the very latest for skimage2.

@lagru lagru added 🔧 type: Maintenance Refactoring and maintenance of internals 🔽 Deprecation Involves deprecation 📜 type: API Involves API change(s) labels Jan 14, 2024
@lagru
Copy link
Member Author

lagru commented Jan 14, 2024

... or would this function cease being useful because we would stop using intensity conventions for images alltogether?

@lagru lagru added the 🧊 Backburner Low-priority issue label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔽 Deprecation Involves deprecation 🧊 Backburner Low-priority issue 📜 type: API Involves API change(s) 🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
Development

No branches or pull requests

1 participant