"server/vscode:/vscode.git/clone" did not exist on "52647592d703bea4d12ec3ba1f94e0604c1d778e"
Commit 13d1a6cc authored by vfdev's avatar vfdev Committed by Soumith Chintala
Browse files

Update functional.py (#421)

if on dtype -> elif on dtype
parent f1b79d90
......@@ -115,9 +115,9 @@ def to_pil_image(pic, mode=None):
npimg = npimg[:, :, 0]
if npimg.dtype == np.uint8:
expected_mode = 'L'
if npimg.dtype == np.int16:
elif npimg.dtype == np.int16:
expected_mode = 'I;16'
if npimg.dtype == np.int32:
elif npimg.dtype == np.int32:
expected_mode = 'I'
elif npimg.dtype == np.float32:
expected_mode = 'F'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment