浏览代码

indent fix

Xi Ruoyao 6 年之前
父节点
当前提交
89b6f596ea
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      main.py

+ 10 - 10
main.py

@@ -36,17 +36,17 @@ if __name__ == '__main__':
     colors = [plt.cm.Spectral(each)
     colors = [plt.cm.Spectral(each)
                       for each in np.linspace(0, 1, len(unique_labels))]
                       for each in np.linspace(0, 1, len(unique_labels))]
     for k, col in zip(unique_labels, colors):
     for k, col in zip(unique_labels, colors):
-            if k == -1:
-                    # Black used for noise.
-                    col = [0, 0, 0, 1]
+        if k == -1:
+            # Black used for noise.
+            col = [0, 0, 0, 1]
 
 
-            class_member_mask = (labels == k)
+        class_member_mask = (labels == k)
 
 
-            xy = x[class_member_mask & core_samples_mask]
-            plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
-                             markeredgecolor='k', markersize=14)
+        xy = x[class_member_mask & core_samples_mask]
+        plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
+                         markeredgecolor='k', markersize=14)
 
 
-            xy = x[class_member_mask & ~core_samples_mask]
-            plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
-                             markeredgecolor='k', markersize=6)
+        xy = x[class_member_mask & ~core_samples_mask]
+        plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
+                         markeredgecolor='k', markersize=6)
     plt.show()
     plt.show()