Ignore:
Timestamp:
Feb 7, 2005, 6:03:02 PM (20 years ago)
Author:
ole
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/util.py

    r840 r841  
    335335            lines = lines[1:]
    336336        else:
    337             attribute_names = None
    338    
    339         points = []     
    340         attributes = []
     337            attribute_names = ['elevation']  #HACK
     338
     339        attributes = {}   
     340        for key in attribute_names:
     341            attributes[key] = []
     342
     343        points = []
    341344        for line in lines:
    342345            fields = line.strip().split()
    343346            points.append( (float(fields[0]), float(fields[1])) )
    344             attributes.append( [float(z) for z in fields[2:] ] )
     347            for i, key in enumerate(attribute_names):
     348                attributes[key].append( float(fields[2+i]) )
    345349       
    346350    return points, attributes
Note: See TracChangeset for help on using the changeset viewer.