arrays obtained from Image.open with np.asarray being immutable – “assignment destination is read-only”

Check if the array is writable with

>>> img.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : False
  OWNDATA : True
  WRITEABLE : False
  ALIGNED : True
  UPDATEIFCOPY : False

If WRITEABLEis false, change it with

img.setflags(write=1)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)