Ignore:
Timestamp:
Feb 25, 2009, 9:37:22 AM (15 years ago)
Author:
rwilson
Message:

numpy changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/load_mesh/loadASCII.py

    r6360 r6410  
    626626        num.array(mesh['vertex_attribute_titles'], num.character)
    627627    mesh['segments'] = num.array(mesh['segments'], IntType)
    628     print ("Before num.array(), mesh['segment_tags']=%s"
    629            % str(mesh['segment_tags']))
    630628    mesh['segment_tags'] = num.array(mesh['segment_tags'], num.character)
    631     print ("After num.array(), mesh['segment_tags']=%s"
    632            % str(mesh['segment_tags']))
    633     print "mesh['segment_tags'].shape=%s" % str(mesh['segment_tags'].shape)
    634629    mesh['triangles'] = num.array(mesh['triangles'], IntType)
    635630    mesh['triangle_tags'] = num.array(mesh['triangle_tags'])
     
    11061101def take_points(dict, indices_to_keep):
    11071102    dict = point_atts2array(dict)
    1108     dict['pointlist'] = num.take(dict['pointlist'], indices_to_keep)
     1103    dict['pointlist'] = num.take(dict['pointlist'], indices_to_keep, axis=0)
    11091104
    11101105    for key in dict['attributelist'].keys():
    11111106        dict['attributelist'][key] = num.take(dict['attributelist'][key],
    1112                                               indices_to_keep)
     1107                                              indices_to_keep, axis=0)
    11131108
    11141109    return dict
Note: See TracChangeset for help on using the changeset viewer.