I am trying to modify the weights of cifar cnn and rerun inference with the modified weights. When I try to modify the weights by passing it to a function, I get the Len() of unsized object error. 

```
f1 = h5py.File('/content/model_weights.h5', 'r+')     # open the file
data = np.array(f1.get('/conv1d_1/conv1d_1/bias:0'))
data[...] = one_hot_bit_List(data)                      # assign new values to data
f1.close()  

```

This is the function that I pass the List to:

```
 def one_hot_bit_List(myList) :
   # m = np.fromstring(myList)
    for n in range(0, len(myList)) :
        myList[n] = one_hot_bit_val(myList[n])
    return myList

```

Error traceback:

```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-bec51affd860> in <module>()
      1 f1 = h5py.File('/content/model_weights.h5', 'r+')     # open the file
      2 data = np.array(f1.get('/conv1d_1/conv1d_1/bias:0'))
----> 3 data[...] = one_hot_bit_List(data)                      # assign new values to data
      4 f1.close()

<ipython-input-14-83e75db70b57> in one_hot_bit_List(myList)
     70 def one_hot_bit_List(myList) :
     71    # m = np.fromstring(myList)
---> 72     for n in range(0, len(myList)) :
     73         myList[n] = one_hot_bit_val(myList[n])
     74     return myList

TypeError: len() of unsized object

```

I am new to python so any help would be appreciated!