Skip to content

Commit 4deaaed

Browse files
nitbharambeCopilotJerry-Jinfeng-Guo
authored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]> Co-authored-by: Jerry Guo <[email protected]> Signed-off-by: Nitish Bharambe <[email protected]>
1 parent 61721df commit 4deaaed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/power_grid_model_io/converters/pgm_json_converter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,15 @@ def _is_nan(data: np.ndarray) -> bool:
300300
"""
301301
Determine if the data point is valid
302302
Args:
303-
data: a single scaler or numpy array
303+
data: a single scalar or numpy array
304304
305305
Returns:
306-
True if all the data points are invalid
306+
True when all the data points are invalid
307307
False otherwise
308308
"""
309309
nan_func = {
310310
np.dtype("f8"): lambda x: np.all(np.isnan(x)),
311-
np.dtype("i4"): lambda x: np.all(x == np.iinfo("i4").min),
312-
np.dtype("i1"): lambda x: np.all(x == np.iinfo("i1").min),
311+
np.dtype("i4"): lambda x: np.all(x == np.iinfo(np.dtype("i4")).min),
312+
np.dtype("i1"): lambda x: np.all(x == np.iinfo(np.dtype("i1")).min),
313313
}
314314
return bool(nan_func[data.dtype](data))

0 commit comments

Comments
 (0)