diff --git a/python/graphstorm/gconstruct/transform.py b/python/graphstorm/gconstruct/transform.py index 3995547a98..f13ab1f123 100644 --- a/python/graphstorm/gconstruct/transform.py +++ b/python/graphstorm/gconstruct/transform.py @@ -1029,7 +1029,7 @@ def call(self, feats): # raw_ids is a numpy array # handle empty strings in raw_ids raw_ids = raw_ids.astype(str) - nid_idx = raw_ids != "" + nid_idx = np.nonzero(raw_ids != "")[0] nids, _ = nid_map.map_id(raw_ids[nid_idx].astype( nid_map.map_key_dtype)) neg_ids[i][nid_idx] = nids