Skip to content

Commit 561cdc7

Browse files
committed
fixup!82604: set dtype correctly
1 parent 5fbfc73 commit 561cdc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

model/gym-interface/py/ns3ai_gym_env/envs/ns3_environment.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def _create_space(self, spaceDesc):
6161
return space
6262

6363
def _create_data(self, dataContainerPb):
64+
import pdb; pdb.set_trace()
6465
if dataContainerPb.type == pb.Discrete:
6566
discreteContainerPb = pb.DiscreteDataContainer()
6667
dataContainerPb.data.Unpack(discreteContainerPb)
@@ -73,9 +74,9 @@ def _create_data(self, dataContainerPb):
7374
# print(boxContainerPb.shape, boxContainerPb.dtype, boxContainerPb.uintData)
7475

7576
if boxContainerPb.dtype == pb.INT:
76-
data = np.array(boxContainerPb.doubleData, dtype=int)
77+
data = np.array(boxContainerPb.intData, dtype=int)
7778
elif boxContainerPb.dtype == pb.UINT:
78-
data = np.array(boxContainerPb.doubleData, dtype=np.uint)
79+
data = np.array(boxContainerPb.uintData, dtype=np.uint)
7980
elif boxContainerPb.dtype == pb.DOUBLE:
8081
data = np.array(boxContainerPb.doubleData, dtype=np.float64)
8182
else:

0 commit comments

Comments
 (0)