Ignore:
Timestamp:
Sep 1, 2009, 10:29:19 AM (15 years ago)
Author:
steve
Message:

Committing latest parallel code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/visualiser/offline.py

    r4325 r7452  
    1 from Numeric import array, Float, ravel, zeros
     1#from Numeric import array, Float, ravel, zeros
     2import numpy as num
    23from Scientific.IO.NetCDF import NetCDFFile
    34from Tkinter import Button, E, Tk, W, Label, StringVar, Scale, HORIZONTAL
     
    8081        else:
    8182            N_vert = len(fin.variables[quantityName])
    82         x = ravel(array(fin.variables['x'], Float))
    83         y = ravel(array(fin.variables['y'], Float))
     83        x = num.ravel(num.array(fin.variables['x'], num.float))
     84        y = num.ravel(num.array(fin.variables['y'], num.float))
    8485        if dynamic is True:
    85             q = array(fin.variables[quantityName][frameNumber], Float)
    86         else:
    87             q = ravel(array(fin.variables[quantityName], Float))
     86            q = num.array(fin.variables[quantityName][frameNumber], num.float)
     87        else:
     88            q = num.ravel(num.array(fin.variables[quantityName], num.float))
    8889
    8990        q *= self.height_zScales[quantityName]
     
    123124        for q in filter(lambda n:n != 'x' and n != 'y' and n != 'z' and n != 'time' and n != 'volumes', fin.variables.keys()):
    124125            if len(fin.variables[q].shape) == 1: # Not a time-varying quantity
    125                 quantities[q] = ravel(array(fin.variables[q], Float))
     126                quantities[q] = num.ravel(num.array(fin.variables[q], num.float))
    126127            else: # Time-varying, get the current timestep data
    127                 quantities[q] = array(fin.variables[q][self.frameNumber], Float)
     128                quantities[q] = num.array(fin.variables[q][self.frameNumber], num.float)
    128129        fin.close()
    129130        return quantities
Note: See TracChangeset for help on using the changeset viewer.