Nei Cardoso de Oliveira Neto

Results 30 comments of Nei Cardoso de Oliveira Neto

Read the image with `rawpy` and check it. ```python >>> import rawpy >>> pic = rawpy.imread('long/00001_00_10s.ARW') >>> pic.black_level_per_channel [512, 512, 512, 512] >>> np.max(pic.raw_image) 16383 ``` RawPy's documentation: https://letmaik.github.io/rawpy/api/rawpy.RawPy.html

Perhaps. Try it out. That `np.max` strategy to find out bit depth is not the best, but it often works. At least you figured out your black level. From there,...

And by the way, yes that's got everything to do with your black image. You're normalizing the picture as if it were 14 bits and its black level were 1024...

As the mention above indicates, I ran into a case where this could be useful on a function composition pipeline if one of the fucntions returned a tuple with the...

Python's type hints can be lacking when it comes to higher-order functions. However, it does make some things much, much easier. For example, having decent code completion can only be...

I believe the extended function semantics could be supported with `@overload` annotations. Something along the lines of ```python from __future__ import annotations from typing import Callable, Iterable, Mapping, TypeVar, overload...

Sometimes, yes. But in cases where the returned type is conditioned on the type of the input, overloading is a must. Otherwise invalid types would be inferred: ```python def funcy_map(...

There's also sets, which would return `Iterable[bool]`. And slices which would return `Iterable[tuple[Y, ...]]` if I'm not mistaken.

I'm pretty sure that's more of a general programming thing. But if Haskell has interesting ways of dealing with it, it may be useful to highlight it. Python for example...

Having the ability to do this would be useful for many usecases. Looking forward for updates.