Changeset 7207


Ignore:
Timestamp:
Jun 17, 2009, 4:12:11 PM (15 years ago)
Author:
rwilson
Message:

Back-merge from Numeric trunk. Final one?

Location:
branches/numpy/anuga
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/abstract_2d_finite_volumes/general_mesh.py

    r6843 r7207  
    194194            self.edgelengths[i, :] = [l0, l1, l2]
    195195
    196         # Build structure listing which trianglse belong to which node.
     196        # Build structure listing which triangles belong to which node.
    197197        if verbose: print 'Building inverted triangle structure'
    198198        self.build_inverted_triangle_structure()
  • branches/numpy/anuga/abstract_2d_finite_volumes/quantity.py

    r7176 r7207  
    11871187        import types
    11881188
    1189         msg = 'Indices must be a list, array or None'
     1189        msg = "'indices' must be a list, array or None"
    11901190        assert isinstance(indices, (NoneType, list, num.ndarray)), msg
    11911191
  • branches/numpy/anuga/geospatial_data/test_geospatial_data.py

    r7176 r7207  
    17211721
    17221722            P = G1.get_data_points(absolute=False)
    1723             expected = [[425835., 137518.]]
     1723            expected = [[982420., 28233.]]
    17241724            msg = 'expected=%s, but\nP=%s' % (str(expected), str(P))
    17251725            assert num.allclose(P, expected), msg
  • branches/numpy/anuga/pmesh/test_mesh_interface.py

    r7035 r7207  
    7676                                          polygon_absolute, closed=False),
    7777                        msg)
    78 #                        'FAILED!')
    7978
    8079        # Assuming the order of the region points is known.
  • branches/numpy/anuga/shallow_water/data_manager.py

    r7176 r7207  
    31893189              % (num.min(times), num.max(times), len(times.flat))
    31903190
    3191         q = amplitudes.flatten()
     3191#        q = amplitudes.flatten()
    31923192        name = 'Amplitudes (ha) [cm]'
    3193         print '  %s in [%f, %f]' % (name, min(q), max(q))
    3194 
    3195         q = uspeed.flatten()
     3193        print '  %s in [%f, %f]' % (name, num.min(amplitudes), num.max(amplitudes))
     3194
     3195#        q = uspeed.flatten()
    31963196        name = 'Speeds (ua) [cm/s]'
    3197         print '  %s in [%f, %f]' % (name, min(q), max(q))
    3198 
    3199         q = vspeed.flatten()
     3197        print '  %s in [%f, %f]' % (name, num.min(uspeed), num.max(uspeed))
     3198
     3199#        q = vspeed.flatten()
    32003200        name = 'Speeds (va) [cm/s]'
    3201         print '  %s in [%f, %f]' % (name, min(q), max(q))
    3202 
    3203         q = elevations.flatten()
     3201        print '  %s in [%f, %f]' % (name, num.min(vspeed), num.max(vspeed))
     3202
     3203#        q = elevations.flatten()
    32043204        name = 'Elevations (e) [m]'
    3205         print '  %s in [%f, %f]' % (name, min(q), max(q))
     3205        print '  %s in [%f, %f]' % (name, num.min(elevations), num.max(elevations))
    32063206
    32073207    # print number_of_latitudes, number_of_longitudes
     
    33373337        print '  Quantities [SI units]:'
    33383338        for name in ['stage', 'xmomentum', 'ymomentum', 'elevation']:
    3339             q = outfile.variables[name][:].flatten()
    3340             print '    %s in [%f, %f]' % (name, min(q), max(q))
     3339            q = outfile.variables[name][:]    # .flatten()
     3340            print '    %s in [%f, %f]' % (name, num.min(q), num.max(q))
    33413341
    33423342    outfile.close()
     
    73637363            points = num.ascontiguousarray(num.concatenate((x[:,num.newaxis],
    73647364                                                            y[:,num.newaxis]),
    7365                                                            axis=1))
     7365                                                            axis=1))
    73667366            point_indices = inside_polygon(points, polygon)
    73677367
  • branches/numpy/anuga/shallow_water/shallow_water_domain.py

    r7193 r7207  
    913913        """
    914914       
    915         boundary_flows, total_boundary_inflow, total_boundary_outflow = self.compute_boundary_flows()
     915        (boundary_flows, total_boundary_inflow,
     916         total_boundary_outflow) = self.compute_boundary_flows()
    916917       
    917918        s = '---------------------------\n'       
  • branches/numpy/anuga/shallow_water/tsunami_okada.py

    r6472 r7207  
    215215            yrec=x
    216216            for i in range(0,len(zrec[0])):
    217                 if (num.any(zrec[0][i]==yrec) and num.any(zrec[1][i]==xrec)):
     217                if (num.all(zrec[0][i]==yrec) and num.all(zrec[1][i]==xrec)):
    218218                    Z=zrec[2][i]
    219219                    Z=0.001*Z
  • branches/numpy/anuga/utilities/interp.py

    r6304 r7207  
    138138    """
    139139    import arrayfns
    140     import numpy.ma MA
     140    import numpy.ma as MA
    141141    import numpy as N
    142142    from where_close import where_close
Note: See TracChangeset for help on using the changeset viewer.