xlin 0.1.21__tar.gz → 0.1.22__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xlin
3
- Version: 0.1.21
3
+ Version: 0.1.22
4
4
  Summary: toolbox for LinXueyuan
5
5
  License: MIT
6
6
  Author: LinXueyuanStdio
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "xlin"
3
- version = "0.1.21"
3
+ version = "0.1.22"
4
4
  description = "toolbox for LinXueyuan"
5
5
  authors = ["LinXueyuanStdio <23211526+LinXueyuanStdio@users.noreply.github.com>"]
6
6
  license = "MIT"
@@ -19,7 +19,7 @@ def bucket_count(length: List[int], step=50, skip_zero_count=False):
19
19
  continue
20
20
  if skip_zero_count and j == 0:
21
21
  continue
22
- print(f"[{(i-1)*step}, {i*step}) {j} {sum(grouped_count[:i+1])/len(length)*100:.2f}%")
22
+ print(f"[{(i-1)*step}, {i*step}) {j} {sum(grouped_count[:i+1])/len(length)*100:.4f}%")
23
23
  x.append((i - 1) * step)
24
24
  y.append(j)
25
25
  return x, y
@@ -73,22 +73,22 @@ def draw_histogram(data: list[int], bins=30, title="Data Distribution Analysis")
73
73
  plt.plot(x_vals, kde(x_vals), color="navy", linewidth=2, label="KDE Curve")
74
74
 
75
75
  # 添加统计线
76
- plt.axvline(mean, color="red", linestyle="--", linewidth=2, label=f"Mean ({mean:.2f})")
77
- plt.axvline(median, color="green", linestyle="-.", linewidth=2, label=f"Median ({median:.2f})")
78
- plt.axvspan(mean - std, mean + std, color="orange", alpha=0.1, label=f"±1 Std.Dev ({std:.2f})")
76
+ plt.axvline(mean, color="red", linestyle="--", linewidth=2, label=f"Mean ({mean:.4f})")
77
+ plt.axvline(median, color="green", linestyle="-.", linewidth=2, label=f"Median ({median:.4f})")
78
+ plt.axvspan(mean - std, mean + std, color="orange", alpha=0.1, label=f"±1 Std.Dev ({std:.4f})")
79
79
 
80
80
  # 添加四分位线
81
- plt.axvline(q25, color="purple", linestyle=":", alpha=0.8, label=f"25th Percentile ({q25:.2f})")
82
- plt.axvline(q75, color="purple", linestyle=":", alpha=0.8, label=f"75th Percentile ({q75:.2f})")
83
- plt.axvline(q80, color="purple", linestyle=":", alpha=0.8, label=f"80th Percentile ({q80:.2f})")
84
- plt.axvline(q90, color="purple", linestyle=":", alpha=0.8, label=f"90th Percentile ({q90:.2f})")
81
+ plt.axvline(q25, color="purple", linestyle=":", alpha=0.8, label=f"25th Percentile ({q25:.4f})")
82
+ plt.axvline(q75, color="purple", linestyle=":", alpha=0.8, label=f"75th Percentile ({q75:.4f})")
83
+ plt.axvline(q80, color="purple", linestyle=":", alpha=0.8, label=f"80th Percentile ({q80:.4f})")
84
+ plt.axvline(q90, color="purple", linestyle=":", alpha=0.8, label=f"90th Percentile ({q90:.4f})")
85
85
 
86
86
  # 添加统计摘要
87
87
  stats_text = f"""\
88
- Data Range: [{data_range[0]:.2f}, {data_range[1]:.2f}]
88
+ Data Range: [{data_range[0]:.4f}, {data_range[1]:.4f}]
89
89
  Observations: {len(data):,}
90
- Standard Deviation: {std:.2f}
91
- IQR: {q75 - q25:.2f}
90
+ Standard Deviation: {std:.4f}
91
+ IQR: {q75 - q25:.4f}
92
92
  Skewness: {float((data - mean).mean()**3 / std**3):.4f}
93
93
  Kurtosis: {float((data - mean).mean()**4 / std**4):.4f}\
94
94
  """
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes