Python: i cant do substitution -


i'm using python2.7

i ran code

print r.data print r[0][action-1].data 

then throws this.

[[ 0.34642464 0.39359313 -1.24270797 -0.89923799 0.11451679 -0.49929592]]

-0.499295920134

then, tried substitution "r" this

r[0][action-1].data = 1 

but couldn't.

print r[0][action-1].data 

-0.499295920134

what's problem? imported this.

import numpy np         import matplotlib.pyplot plt import cv2 import random import chainer chainer import cuda chainer import serializers import chainer.functions f chainer import optimizers 

print(type(r)) is

class 'chainer.variable.variable'

print (type(r[0]) 

is also

class 'chainer.variable.variable'

  


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -