Changeset 6152 for anuga_core/source/anuga/fit_interpolate/fit.py
- Timestamp:
- Jan 13, 2009, 2:20:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/fit.py
r5855 r6152 28 28 import types 29 29 30 from Numeric import zeros, Float, ArrayType,take, Int31 32 30 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 33 31 from anuga.caching import cache … … 46 44 class TooFewPointsError(exceptions.Exception): pass 47 45 class VertsWithNoTrianglesError(exceptions.Exception): pass 46 47 import Numeric as num 48 48 49 49 50 #DEFAULT_ALPHA = 0.001 … … 252 253 if len(z.shape) > 1: 253 254 att_num = z.shape[1] 254 self.Atz = zeros((m,att_num),Float)255 self.Atz = num.zeros((m,att_num), num.Float) 255 256 else: 256 257 att_num = 1 257 self.Atz = zeros((m,),Float)258 self.Atz = num.zeros((m,), num.Float) 258 259 assert z.shape[0] == point_coordinates.shape[0] 259 260 … … 437 438 # Convert input to Numeric arrays 438 439 if z is not None: 439 z = ensure_numeric(z, Float)440 z = ensure_numeric(z, num.Float) 440 441 else: 441 442 msg = 'z not specified' … … 443 444 z = point_coordinates.get_attributes(attribute_name) 444 445 445 point_coordinates = ensure_numeric(point_coordinates, Float)446 point_coordinates = ensure_numeric(point_coordinates, num.Float) 446 447 self._build_matrix_AtA_Atz(point_coordinates, z, verbose) 447 448 … … 584 585 585 586 #Convert input to Numeric arrays 586 triangles = ensure_numeric(triangles, Int)587 triangles = ensure_numeric(triangles, num.Int) 587 588 vertex_coordinates = ensure_absolute(vertex_coordinates, 588 589 geo_reference = mesh_origin) … … 651 652 vertex_coordinates = mesh_dict['vertices'] 652 653 triangles = mesh_dict['triangles'] 653 if type(mesh_dict['vertex_attributes']) == ArrayType:654 if type(mesh_dict['vertex_attributes']) == num.ArrayType: 654 655 old_point_attributes = mesh_dict['vertex_attributes'].tolist() 655 656 else: 656 657 old_point_attributes = mesh_dict['vertex_attributes'] 657 658 658 if type(mesh_dict['vertex_attribute_titles']) == ArrayType:659 if type(mesh_dict['vertex_attribute_titles']) == num.ArrayType: 659 660 old_title_list = mesh_dict['vertex_attribute_titles'].tolist() 660 661 else:
Note: See TracChangeset
for help on using the changeset viewer.