PILLOW/Image.py", line 1937, in fromarray
obj = obj.tobytes()
AttributeError: 'numpy.ndarray' object has no attribute 'tobytes'

changing tobytes to tostring solves the problem.

passed all 57 tests.