Changeset 1201


Ignore:
Timestamp:
05/02/09 19:19:57 (3 years ago)
Author:
Peter Peterson
Message:

Fixed spelling error. Refs #158.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/applications/nxdiff

    r1200 r1201  
    342342        rightLength *= right.dims 
    343343 
    344     # the threashold for printing values 
    345     try: 
    346         threashold = kwargs["threashold"] 
     344    # the threshold for printing values 
     345    try: 
     346        threshold = kwargs["threshold"] 
    347347    except KeyError: 
    348         threashold = None 
     348        threshold = None 
    349349 
    350350    try: 
     
    354354 
    355355    # how many items to show 
    356     if not threashold: 
     356    if not threshold: 
    357357        try: 
    358358            numItems = kwargs["numitems"] 
     
    382382        print rightSym, right.attrs 
    383383 
    384     if threashold is None: 
     384    if threshold is None: 
    385385        try: 
    386386            print leftSym, left.data.__str__(last=leftLength) 
     
    401401            if isNaN(myDiff): 
    402402                nanIndices.append(index) 
    403             elif myDiff > threashold: 
     403            elif myDiff > threshold: 
    404404                changeInfo.append((index, myDiff, left.data[i], right.data[i])) 
    405405        print "%d values changed between number and NaN" % len(nanIndices) 
    406406        print "%d values changed more than %.2f%%" % (len(changeInfo), 
    407                                                     threashold) 
     407                                                    threshold) 
    408408        if shownandiffs and len(nanIndices) > 0: 
    409409            print "Indices changed between number and NaN:", nanIndices 
     
    449449                      + "is ten (10). To show all values specify minus one " 
    450450                      + "(-1).") 
    451     parser.add_option("", "--show-percent", dest="threashold", 
    452                       help="Set a threashold for the minimum percentage " 
     451    parser.add_option("", "--show-percent", dest="threshold", 
     452                      help="Set a threshold for the minimum percentage " 
    453453                      + "difference shown in values. This turns on " 
    454454                      + "\"--show-values\" mode and overrides " 
     
    470470    parser.set_defaults(ignorelinks=False) 
    471471    parser.set_defaults(numvalues=None) 
    472     parser.set_defaults(threashold=None) 
     472    parser.set_defaults(threshold=None) 
    473473    parser.set_defaults(shownandiffs=False) 
    474474    parser.set_defaults(ignorenotes=False) 
     
    488488    else: 
    489489        options.numvalues = 0 
    490     if options.threashold is not None: 
     490    if options.threshold is not None: 
    491491        options.showvalues = True 
    492         options.threashold = float(options.threashold) 
     492        options.threshold = float(options.threshold) 
    493493    if len(args) != 2: 
    494494        parser.error("Must compare two files") 
     
    543543            printDataDiff(left, right, diff, format=format, 
    544544                          numitems=options.numvalues, 
    545                           threashold=options.threashold, 
     545                          threshold=options.threshold, 
    546546                          shownandiffs=options.shownandiffs) 
Note: See TracChangeset for help on using the changeset viewer.