i have dictionary with "text" as keys and corresponding list of "arrays" as values. How can i convert this arrays to images?
{'all': [[array([[[ 0. , 1. , 0. ],
[ 0. , 1. , 0. ],
[ 0. , 1. , 0. ],
...
[[ 0. , 1. , 0. ],
[ 0. , 1. , 0. ],
[ 0.75686276, 0.60392159, 0.54901963],
It looks like this. For each word , i will have one or more arrays.
This is how i tried
updated..
a=New_array["had"]
b=len(a)
for i in a:
for ii in i:
plt.imshow(ii)
plt.show()
And i want to save the images for each key in the dictionary.
i? I would usematplotlib'simshowfunction for this. In Python almost all libraries use numpy arrays to represent images - you do not need to "convert" them as such. Also what do you want the output to be? Do you want to save the images? Or just show them? If you edit your question to provide a bit more context it'll give people a better chance of helping you.