Changeset 1822


Ignore:
Timestamp:
Sep 12, 2005, 6:18:51 PM (19 years ago)
Author:
ole
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/least_squares.py

    r1820 r1822  
    12021202            q = quantities[name][:].flat
    12031203            str += '    %s in [%f, %f]\n' %(name, min(q), max(q))
    1204         str += '  Interpolation points (xi, eta):'\
    1205                ' number of points == %d\n' %interpolation_points.shape[0]
    1206         str += '    xi in [%f, %f]\n' %(min(interpolation_points[:,0]),
    1207                                         max(interpolation_points[:,0]))
    1208         str += '    eta in [%f, %f]\n' %(min(interpolation_points[:,1]),
    1209                                          max(interpolation_points[:,1]))
    1210         str += '  Interpolated quantities (over all timesteps):\n'
     1204
     1205        if interpolation_points is not None:   
     1206            str += '  Interpolation points (xi, eta):'\
     1207                   ' number of points == %d\n' %interpolation_points.shape[0]
     1208            str += '    xi in [%f, %f]\n' %(min(interpolation_points[:,0]),
     1209                                            max(interpolation_points[:,0]))
     1210            str += '    eta in [%f, %f]\n' %(min(interpolation_points[:,1]),
     1211                                             max(interpolation_points[:,1]))
     1212            str += '  Interpolated quantities (over all timesteps):\n'
    12111213       
    1212         for name in quantity_names:
    1213             q = precomputed_values[name][:].flat
    1214             str += '    %s at interpolation points in [%f, %f]\n'\
    1215                    %(name, min(q), max(q))
     1214            for name in quantity_names:
     1215                q = precomputed_values[name][:].flat
     1216                str += '    %s at interpolation points in [%f, %f]\n'\
     1217                       %(name, min(q), max(q))
    12161218        str += '------------------------------------------------\n'
    12171219
Note: See TracChangeset for help on using the changeset viewer.