Commit 4efe618
committed
Revert "Replace dtype (uint8 or uint16) with dtype int"
I don't think I agree with the commit this reverts
(922710f).
Yes, you can technically pass dtype=np.int64 or similar as an `image`.
But this will incur precision loss and a warning, urging you to convert
to uint16 before.
This seems unexpected in context of dtype int. The reason we are doing
this is so that type checkers can be useful and can catch issue like
this beforehand. They won't if we use int here.
Instead, I think we should treat this as an undocumented backwards
compatible fallback.1 parent cd0f6fa commit 4efe618
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
0 commit comments