mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-28 13:20:14 +08:00
remove superfluous conditional logic
This commit is contained in:
1 parent
dcb7dacc6c
commit
a31e0d9eeb
1 file changed
+1
-5
@@ -105,11 +105,7 @@ def imsave(fname, arr, format_str=None):
|
||||
arr = arr.astype(np.uint8)
|
||||
|
||||
img = Image.fromstring(mode, (arr.shape[1], arr.shape[0]), arr.tostring())
|
||||
|
||||
if isinstance(fname, basestring):
|
||||
img.save(fname, format=format_str)
|
||||
elif callable(getattr(fname, 'write', None)):
|
||||
img.save(fname, format=format_str)
|
||||
img.save(fname, format=format_str)
|
||||
|
||||
|
||||
def imshow(arr):
|
||||
|
||||
Reference in new issue
Block a user