Kirk Trombley 2 年之前
父节点
当前提交
b241f74e76
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tools/analyze.py

+ 2 - 2
tools/analyze.py

@@ -60,10 +60,10 @@ class Stats:
   centroid: list[float]
   tilt: list[float]
   # scalar statistics
-  size: int
   variance: float
   chroma: float
   hue: float
+  size: int
   # sRGB hex code of the centroid
   hex: str
 
@@ -88,10 +88,10 @@ def calc_statistics(pixels: np.array) -> Stats:
   return Stats(
     centroid=list(np.round(centroid, OUTPUT_PRECISION)),
     tilt=list(np.round(tilt, OUTPUT_PRECISION)),
-    size=len(pixels),
     variance=round(variance, OUTPUT_PRECISION),
     chroma=round(chroma.mean(axis=0), OUTPUT_PRECISION),
     hue=round(hue % (2 * math.pi), OUTPUT_PRECISION),
+    size=len(pixels),
     hex=oklab2hex(centroid),
   )