mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-14 11:18:06 +08:00
explicitly checking for None as per code review feedback
- instead of implicit (non-truthy) test
This commit is contained in:
@@ -57,8 +57,8 @@ def pil_to_ndarray(im, dtype=None):
|
||||
elif 'A' in im.mode:
|
||||
im = im.convert('RGBA')
|
||||
im = np.array(im, dtype=dtype)
|
||||
if fp:
|
||||
fp.close()
|
||||
if fp is not None:
|
||||
fp.close()
|
||||
return im
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user