Ignore:
Timestamp:
Mar 4, 2009, 8:26:22 AM (15 years ago)
Author:
rwilson
Message:

After changes to get_absolute, ensure_numeric, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/coordinate_transforms/geo_reference.py

    r6428 r6441  
    88
    99import types, sys
     10import copy
     11
    1012from anuga.utilities.numerical_tools import ensure_numeric
    1113from anuga.utilities.anuga_exceptions import ANUGAError, TitleError, \
     
    240242    # @return The changed points.
    241243    # @note If 'points' is a list then a changed list is returned.
    242     # @note The input points data is changed.
    243244    def change_points_geo_ref(self, points, points_geo_ref=None):
    244245        """Change the geo reference of a list or numeric array of points to
     
    250251        is_list = isinstance(points, list)
    251252
    252         points = ensure_numeric(points, num.float)
     253        points = ensure_numeric(copy.copy(points), num.float)
    253254
    254255        # sanity checks
     
    308309        is_list = isinstance(points, list)
    309310
    310         # convert to numeric array
    311         points = ensure_numeric(points, num.float)
     311        # convert to numeric array, force a copy
     312        points = ensure_numeric(copy.copy(points), num.float)
    312313
    313314        # sanity checks
     
    328329            points[:,0] += self.xllcorner
    329330            points[:,1] += self.yllcorner
    330             #self.is_absolute = True
    331331
    332332        # if we got a list, return a list
Note: See TracChangeset for help on using the changeset viewer.