- Timestamp:
- Mar 4, 2009, 8:37:22 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/coordinate_transforms/geo_reference.py
r6441 r6442 318 318 msg = 'Single point must have two elements' 319 319 raise ShapeError, msg 320 #points = reshape(points, (1,2))321 320 322 321 if not points.shape[1] == 2: … … 348 347 """ 349 348 350 is_list = False 351 if type(points) == types.ListType: 352 is_list = True 353 354 points = ensure_numeric(points, num.float) 349 # remember if we got a list 350 is_list = isinstance(points, list) 351 352 # convert to a numeric array, force a copy 353 points = ensure_numeric(copy.copy(points), num.float) 354 355 # sanity checks 355 356 if len(points.shape) == 1: 356 357 #One point has been passed … … 358 359 msg = 'Single point must have two elements' 359 360 raise ShapeError, msg 360 #points = reshape(points, (1,2))361 361 362 362 if not points.shape[1] == 2:
Note: See TracChangeset
for help on using the changeset viewer.