You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the probelm is:
when i use a image, to initial the Surface,
error was arise: UFuncTypeError: Cannot cast ufunc 'add' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
after look for the source code, I find the problem of source code: np.dstack([image, 255 * np.ones((h, w))])
the input image' shape is [w, h, 3], type is np.uint8
I change the code to: np.dstack([image, 255 * np.ones((h, w), dtype=np.uint8)])
the problem is disappear.
The text was updated successfully, but these errors were encountered:
the probelm is:
when i use a image, to initial the Surface,
error was arise:
UFuncTypeError: Cannot cast ufunc 'add' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
after look for the source code, I find the problem of source code:
np.dstack([image, 255 * np.ones((h, w))])
the input image' shape is [w, h, 3], type is np.uint8
I change the code to:
np.dstack([image, 255 * np.ones((h, w), dtype=np.uint8)])
the problem is disappear.
The text was updated successfully, but these errors were encountered: