Revert "Format-The-Codebase"

This reverts commit 4d8654f01f.
This commit is contained in:
Ömer Faruk Özdemir 2022-02-10 00:08:59 +03:00
parent 4d8654f01f
commit 6884523ac8

View File

@ -337,12 +337,6 @@ def _convert(image, dtype, force_copy=False, uniform=False):
"""
kind = a.dtype.kind
if n > m and a.max() < 2 ** m:
mnew = int(np.ceil(m / 2) * 2)
if mnew > m:
dtype = "int{}".format(mnew)
else:
dtype = "uint{}".format(mnew)
n = int(np.ceil(n / 2) * 2)
return a.astype(_dtype_bits(kind, m))
elif n == m:
return a.copy() if copy else a