Changeset 82d88d5 in sasview for src/sas/sascalc/pr


Ignore:
Timestamp:
Mar 6, 2019 4:18:09 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
Children:
f923967
Parents:
cb64d86 (diff), f205d3a (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:

Merge branch 'master' into py37-sasgui

Location:
src/sas/sascalc/pr
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/pr/distance_explorer.py

    r959eb01 re090ba90  
    9999                results.pos_err.append(pos_err) 
    100100                results.osc.append(osc) 
    101             except: 
     101            except Exception as exc: 
    102102                # This inversion failed, skip this D_max value 
    103103                msg = "ExploreDialog: inversion failed for " 
    104                 msg += "D_max=%s\n %s" % (str(d), sys.exc_value) 
     104                msg += "D_max=%s\n %s" % (str(d), exc) 
    105105                results.errors.append(msg) 
    106106 
  • src/sas/sascalc/pr/fit/expression.py

    r574adc7 re090ba90  
    210210 
    211211    #print("Function: "+functiondef) 
    212     exec functiondef in globals,locals 
     212    exec(functiondef, globals, locals) 
    213213    retfn = locals['eval_expressions'] 
    214214 
  • src/sas/sascalc/pr/invertor.py

    r57e48ca r7af652d  
    474474 
    475475        # Perform the inversion (least square fit) 
    476         c, chi2, _, _ = lstsq(a, b, rcond=-1) 
     476        # CRUFT: numpy>=1.14.0 allows rcond=None for the following default 
     477        rcond = np.finfo(float).eps * max(a.shape) 
     478        c, chi2, _, _ = lstsq(a, b, rcond=rcond) 
    477479        # Sanity check 
    478480        try: 
  • src/sas/sascalc/pr/num_term.py

    r3e6829d r8c9e65c  
    182182                data_y = np.append(data_y, test_y) 
    183183                data_err = np.append(data_err, err) 
    184             except: 
    185                 logger.error(sys.exc_value) 
     184            except Exception as exc: 
     185                logger.error(exc) 
    186186 
    187187    return data_x, data_y, data_err 
Note: See TracChangeset for help on using the changeset viewer.