We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a31a5ac + 15d8547 commit ad4c2c7Copy full SHA for ad4c2c7
research/gam/gam/data/dataset.py
@@ -545,7 +545,7 @@ def row_normalize(features):
545
rowsum = np.array(features.sum(1))
546
r_inv = np.power(rowsum, -1).flatten()
547
r_inv[np.isinf(r_inv)] = 0.
548
- r_mat_inv = scipy.diags(r_inv)
+ r_mat_inv = scipy.sparse.diags(r_inv)
549
features = r_mat_inv.dot(features)
550
return features
551
0 commit comments