Changeset 5914


Ignore:
Timestamp:
Nov 6, 2008, 4:43:51 PM (16 years ago)
Author:
rwilson
Message:

NumPy? conversion

Location:
anuga_core/source_numpy_conversion/anuga/visualiser_new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source_numpy_conversion/anuga/visualiser_new/feature.py

    r4621 r5914  
    3131        if not self.inRenderer:
    3232            self.inRenderer = True
    33             if type(self.colour[0]) is FloatType:
     33            if isinstance(self.colour[0], FloatType):
    3434                self.actor.GetProperty().SetColor(self.colour)
    3535            renderer.AddActor(self.actor)
  • anuga_core/source_numpy_conversion/anuga/visualiser_new/sww_visualiser.py

    r4621 r5914  
    1 from Numeric import array, Float
     1import numpy
    22from Scientific.IO.NetCDF import NetCDFFile
    33from visualiser import Visualiser
     
    1313        Visualiser.__init__(self, *args, **kwargs)
    1414        fin = NetCDFFile(self.vis_source, 'r')
    15         self.xPoints = array(fin.variables['x'], Float)
    16         self.yPoints = array(fin.variables['y'], Float)
     15        self.xPoints = numpy.array(fin.variables['x'], numpy.float)
     16        self.yPoints = numpy.array(fin.variables['y'], numpy.float)
    1717        self.quantityCache = {}
    1818        fin.close()
     
    4848                if not self.quantityCache.has_key(quantityName):
    4949                    self.quantityCache[quantityName] = {}
    50                 q = array(fin.variables[quantityName][self.vis_frame], Float)
     50                q = numpy.array(fin.variables[quantityName][self.vis_frame], numpy.float)
    5151                self.quantityCache[quantityName][self.vis_frame] = q
    5252            else:
    53                 q = array(fin.variables[quantityName], Float)
     53                q = numpy.array(fin.variables[quantityName], numpy.float)
    5454                self.quantityCache[quantityName] = q
    5555            fin.close()
Note: See TracChangeset for help on using the changeset viewer.