Skip to content

Commit 284e588

Browse files
Handle none case correctly...
1 parent 0fc812b commit 284e588

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

diplomat/predictors/fpe/sparse_storage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def pack(
131131

132132
def unpack_unscaled(self):
133133
x, y, p = self.unpack()
134+
if(x is None):
135+
return None, None, None
134136
return x * self._downscaling, y * self._downscaling, p
135137

136138
def pack_unscaled(
@@ -152,7 +154,7 @@ def unpack(self) -> Tuple[
152154
:return: A tuple of 1 dimensional numpy arrays, being: (x_coord, y_coord, probs)
153155
"""
154156
if (self._data is None):
155-
return (None, None, None)
157+
return None, None, None
156158

157159
return self._data
158160

0 commit comments

Comments
 (0)