Skip to content

Commit

Permalink
Casting Box Datatype
Browse files Browse the repository at this point in the history
- The 'google.protobuf.pyext._message.RepeatedScalarConta' object has no attribute 'reshape'
- Casting that datatype to np.array solves the problem
- Moreover, np.array is everywhere as datatype in ML field.
  • Loading branch information
haidlir authored and pgawlowicz committed May 9, 2023
1 parent cee6a02 commit 76f7f8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions model/ns3gym/ns3gym/ns3env.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def _create_data(self, dataContainerPb):
data = boxContainerPb.floatData

# TODO: reshape using shape info
data = np.array(data)
return data

elif (dataContainerPb.type == pb.Tuple):
Expand Down

0 comments on commit 76f7f8a

Please sign in to comment.