Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/17 14:12:27 (7 years ago)
Author:
pfleck
Message:

#2809 removed ManipulationLogic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs

    r15283 r15285  
    151151      if (VariableHasType<double>(columnIndex)) {
    152152        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        }
    154159        if (valid)
    155160          SetCell(columnIndex, rowIndex, val);
     
    357362      errorMessage = string.Empty;
    358363      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          }
    363372        }
    364373      } else if (VariableHasType<string>(columnIndex)) {
Note: See TracChangeset for help on using the changeset viewer.