awjuliani / DeepRL-Agents

A set of Deep Reinforcement Learning Agents implemented in Tensorflow.
MIT License
2.23k stars 825 forks source link

scipy.misc.imresize is deprecated in Scipy 1.14.3 --> modified code #80

Open hccho2 opened 4 years ago

hccho2 commented 4 years ago

Before:

b = scipy.misc.imresize(a[:,:,0],[84,84,1],interp='nearest')
c = scipy.misc.imresize(a[:,:,1],[84,84,1],interp='nearest')
d = scipy.misc.imresize(a[:,:,2],[84,84,1],interp='nearest')
a = np.stack([b,c,d],axis=2)

After:

a= (skimage.transform.resize(a,[84,84,3],order=0)*255).astype(np.uint8)
ichdich commented 2 years ago

I replaced 4 lines described in "Before:" to 1 line described in "After":. and it worked. Thank you, Heecheol Cho.