Skip to content

Commit 166caf5

Browse files
authored
[Fix]dtype of RadarDataset's data (#823)
1 parent 51fe884 commit 166caf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ppsci/data/dataset/radar_dataset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def __getitem__(self, index):
123123
mask[data < 0] = 0
124124
data[data < 0] = 0
125125
data = np.clip(data, 0, 128)
126-
vid = np.zeros((self.length, self.img_height, self.img_width, 2))
126+
vid = np.zeros(
127+
(self.length, self.img_height, self.img_width, 2), dtype=self.data_type
128+
)
127129
vid[..., 0] = data
128130
vid[..., 1] = mask
129131

0 commit comments

Comments
 (0)