Changeset 15285 for branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
- Timestamp:
- 07/26/17 14:12:27 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
r15283 r15285 151 151 if (VariableHasType<double>(columnIndex)) { 152 152 double val; 153 valid = double.TryParse(value, out val); 153 if (string.IsNullOrWhiteSpace(value)) { 154 val = double.NaN; 155 valid = true; 156 } else { 157 valid = double.TryParse(value, out val); 158 } 154 159 if (valid) 155 160 SetCell(columnIndex, rowIndex, val); … … 357 362 errorMessage = string.Empty; 358 363 if (VariableHasType<double>(columnIndex)) { 359 double val; 360 valid = double.TryParse(value, out val); 361 if (!valid) { 362 errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")"; 364 if (string.IsNullOrWhiteSpace(value)) { 365 valid = true; 366 } else { 367 double val; 368 valid = double.TryParse(value, out val); 369 if (!valid) { 370 errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")"; 371 } 363 372 } 364 373 } else if (VariableHasType<string>(columnIndex)) {
Note: See TracChangeset
for help on using the changeset viewer.