python - TypeError: Image data can not convert to float -


i want create 16 bit image. have written code.

     import skimage       import random      random import randint                              xrow=raw_input("enter number of rows present in image.=>")      row=int(xrow)      ycolumn=raw_input("enter number of columns present in image.=>")      column=int(ycolumn)         a={}        x in xrange(1,row):            y in xrange(1,column):                a=randint(0,65535)                a[x,y]=a          imshow(a) 

but whenever run code, error displaying "typeerror: image data can not convert float".is there solution this.

i apologies mistakes in write up, first question have asked above.

from understand of scikit-image docs (http://scikit-image.org/docs/dev/index.html), imshow() takes ndarray argument, , not dictionary:

http://scikit-image.org/docs/dev/api/skimage.io.html?highlight=imshow#skimage.io.imshow

maybe if post whole stack trace, see typeerror comes somewhere deep imshow().


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -