Lower precision where not needed.
@@ -460,9 +460,9 @@ def compute_membership_strengths(knn_indices, knn_dists, sigmas, rhos):
n_samples = knn_indices.shape[0]
n_neighbors = knn_indices.shape[1]
- rows = np.zeros(knn_indices.size, dtype=np.int64)
- cols = np.zeros(knn_indices.size, dtype=np.int64)
- vals = np.zeros(knn_indices.size, dtype=np.float64)
+ rows = np.zeros(knn_indices.size, dtype=np.int32)
+ cols = np.zeros(knn_indices.size, dtype=np.int32)
+ vals = np.zeros(knn_indices.size, dtype=np.float32)
for i in range(n_samples):
for j in range(n_neighbors):
