Changeset 10943:0cfba445c2a2 in orange


Ignore:
Timestamp:
06/28/12 00:30:31 (22 months ago)
Author:
Peter Husen <phusen@…>
Branch:
default
Parents:
10942:425926238265 (diff), 10941:a8f863fad5b8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Another try at min max in utils

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/utils.py

    r10941 r10943  
    233233                      "geometric mean": geometric_mean, 
    234234                      "harmonic mean": harmonic_mean, 
    235                       "min": lambda values : min( [(0,v) for v in values] + [(1,"?")] )[1], 
    236                       "max": lambda values : max( [(1,v) for v in values] + [(0,"?")] )[1], 
     235                      "min": lambda values : min( [(0,v) for v in values if not v.is_special()] + [(1,"?")] )[1], 
     236                      "max": lambda values : max( [(1,v) for v in values if not v.is_special()] + [(0,"?")] )[1], 
    237237                      "sum": lambda values: sum([float(v) for v in values if not v.is_special()]), 
    238238                      "count": len, 
Note: See TracChangeset for help on using the changeset viewer.