Changeset 6162


Ignore:
Timestamp:
Jan 14, 2009, 3:22:08 PM (10 years ago)
Author:
rwilson
Message:

Changed num.array() calls that should have a defined type.

Location:
anuga_core/source/anuga
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r6153 r6162  
    707707        if verbose: print "make unique random number list and get indices"
    708708
    709         total=num.array(range(self_size))
     709        total=num.array(range(self_size), num.Int)     #array default#
    710710        total_list = total.tolist()
    711711
  • anuga_core/source/anuga/load_mesh/loadASCII.py

    r6154 r6162  
    853853        mesh['vertices'] = fid.variables['vertices'][:]
    854854    except KeyError:
    855         mesh['vertices'] = num.array([])
     855        mesh['vertices'] = num.array([], num.Int)      #array default#
    856856
    857857    try:
     
    873873        mesh['segments'] = fid.variables['segments'][:]
    874874    except KeyError:
    875         mesh['segments'] = num.array([])
     875        mesh['segments'] = num.array([], num.Int)      #array default#
    876876
    877877    mesh['segment_tags'] =[]
     
    888888        mesh['triangle_neighbors'] = fid.variables['triangle_neighbors'][:]
    889889    except KeyError:
    890         mesh['triangles'] = num.array([])
    891         mesh['triangle_neighbors'] = num.array([])
     890        mesh['triangles'] = num.array([], num.Int)      #array default#
     891        mesh['triangle_neighbors'] = num.array([], num.Int)      #array default#
    892892
    893893    mesh['triangle_tags'] =[]
     
    916916        mesh['outline_segments'] = fid.variables['outline_segments'][:]
    917917    except KeyError:
    918         mesh['outline_segments'] = num.array([])
     918        mesh['outline_segments'] = num.array([], num.Int)      #array default#
    919919
    920920    mesh['outline_segment_tags'] =[]
     
    930930        mesh['holes'] = fid.variables['holes'][:]
    931931    except KeyError:
    932         mesh['holes'] = num.array([])
     932        mesh['holes'] = num.array([], num.Int)      #array default#
    933933
    934934    try:
    935935        mesh['regions'] = fid.variables['regions'][:]
    936936    except KeyError:
    937         mesh['regions'] = num.array([])
     937        mesh['regions'] = num.array([], num.Int)      #array default#
    938938
    939939    mesh['region_tags'] =[]
     
    949949        mesh['region_max_areas'] = fid.variables['region_max_areas'][:]
    950950    except KeyError:
    951         mesh['region_max_areas'] = num.array([])
     951        mesh['region_max_areas'] = num.array([], num.Int)      #array default#
    952952    #mesh[''] = fid.variables[''][:]
    953953
  • anuga_core/source/anuga/shallow_water/benchmark_sww2dem.py

    r6157 r6162  
    101101    sww_fileName = tempfile.mktemp(".sww" )
    102102    # sww_fileName = "aa.sww"
    103     elevation = num.array(range(len(mesh_dict["vertices"])))
     103    elevation = num.array(range(len(mesh_dict["vertices"])), num.Int)      #array default#
    104104    stage = elevation
    105105    ymomentum = elevation
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r6157 r6162  
    32053205            volumes.append([v4,v3,v2]) #Lower element
    32063206
    3207     volumes = num.array(volumes)
     3207    volumes = num.array(volumes, num.Int)      #array default#
    32083208
    32093209    if origin is None:
     
    41214121            volumes.append([v4,v2,v3]) #Lower element
    41224122
    4123     volumes = num.array(volumes)
     4123    volumes = num.array(volumes, num.Int)      #array default#
    41244124
    41254125    geo_ref = Geo_reference(refzone, min(x), min(y))
  • anuga_core/source/anuga/shallow_water/eq_test.py

    r6157 r6162  
    7575
    7676y = 10000
    77 points=num.array([[0]*2]*max)
     77points=num.array([[0]*2]*max, num.Int)      #array default#
    7878print points
    7979half_max_skip=(max*skip)/2
     
    8787number_points = profile_lenght/interval
    8888y = 10000
    89 points=num.array([[0]*2]*number_points)
     89points=num.array([[0]*2]*number_points, num.Int)      #array default#
    9090print points
    9191half_profile=profile_lenght/2
  • anuga_core/source/anuga/utilities/sparse.py

    r6158 r6162  
    355355
    356356    #Right hand side column
    357     v = num.array([[2,4],[3,4],[4,4]])
     357    v = num.array([[2,4],[3,4],[4,4]], num.Int)      #array default#
    358358
    359359    u = A*v[:,0]
Note: See TracChangeset for help on using the changeset viewer.