This commit is contained in:
Bob Wu 2017-09-19 12:34:46 +00:00 committed by GitHub
commit e605a2e986

View File

@ -2429,7 +2429,7 @@ def fromarray(obj, mode=None):
if ndim > ndmax: if ndim > ndmax:
raise ValueError("Too many dimensions: %d > %d." % (ndim, ndmax)) raise ValueError("Too many dimensions: %d > %d." % (ndim, ndmax))
size = shape[1], shape[0] size = shape[0], shape[1]
if strides is not None: if strides is not None:
if hasattr(obj, 'tobytes'): if hasattr(obj, 'tobytes'):
obj = obj.tobytes() obj = obj.tobytes()