Kirk Trombley 2 năm trước cách đây
mục cha
commit
b241f74e76
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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),
   )