格式统一
This commit is contained in:
@ -211,7 +211,9 @@ class WaterIndexCsvProcessor:
|
||||
skipped_count += 1
|
||||
continue
|
||||
try:
|
||||
per_idx = results_df[name]
|
||||
# ★ .copy() 确保拿到独立内存,防止上游向量化 eval 的临时视图
|
||||
# 在后续 .replace / .clip / .to_csv 中触发 0xC0000005
|
||||
per_idx = results_df[name].copy()
|
||||
# ===== P0 防御: 写盘前清洗(防 Step 11 Kriging / TIN 碎玻璃)=====
|
||||
# 1) inf / -inf → NaN:pandas 默认会把 inf 写成字面 "Infinity",
|
||||
# 下游 ContentMapper 严格按位置读第 3 列时会原样拿到 inf,
|
||||
|
||||
@ -431,7 +431,8 @@ class WaterQualityInference:
|
||||
if not formulas:
|
||||
print("[特征补全] Calculator 未持有任何公式,跳过补全")
|
||||
else:
|
||||
results_df = calc.calculate_many(formulas, spectra)
|
||||
# fast=True: Step9 特征补全走向量化快车道(~63 公式,已验证稳定)
|
||||
results_df = calc.calculate_many(formulas, spectra, fast=True)
|
||||
# results_df 是列对齐的 WQI 计算结果(每列一个公式,行数=样本数)
|
||||
if isinstance(results_df, pd.DataFrame) and not results_df.empty:
|
||||
original_col_count = spectra.shape[1]
|
||||
|
||||
Reference in New Issue
Block a user