You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to overwrite an object after making a copy using ops.copy, it makes the object immutable. Even after explicitly converting to numpy using ops.convert_to_numpy, the copied object remains immutable.
How to Reproduce:
importnumpyasnpfromkerasimportopsarr=np.arange(10)
ops_arr=ops.copy(arr)
print(type(ops_arr)) # now it's EagerTensorops_arr_np=ops.convert_to_numpy(ops_arr)
print(ops_arr_np) # of type ndarrayops_arr_np[0] =10
And the error that follows:
---------------------------------------------------------------------------ValueErrorTraceback (mostrecentcalllast)
# in <cell line: 9>()7print(ops_arr_np) # of type ndarray8---->9ops_arr_np[0] =10ValueError: assignmentdestinationisread-only
The text was updated successfully, but these errors were encountered:
Issue:
When trying to overwrite an object after making a copy using
ops.copy
, it makes the object immutable. Even after explicitly converting tonumpy
usingops.convert_to_numpy
, the copied object remains immutable.How to Reproduce:
And the error that follows:
The text was updated successfully, but these errors were encountered: