Changeset 7038


Ignore:
Timestamp:
May 14, 2009, 3:07:19 PM (15 years ago)
Author:
rwilson
Message:

Fixed bugs in the back-merge from the Numpy trunk.

Location:
branches/numpy/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/abstract_2d_finite_volumes/quantity.py

    r7037 r7038  
    1414   Otherwise raise an exception
    1515"""
     16
     17from types import FloatType, IntType, LongType, NoneType
    1618
    1719from anuga.utilities.numerical_tools import ensure_numeric, is_scalar
     
    404406
    405407        from anuga.geospatial_data.geospatial_data import Geospatial_data
    406         from types import FloatType, IntType, LongType, ListType, NoneType
    407408
    408409        # Treat special case: Polygon situation
     
    460461
    461462        msg = 'Indices must be a list, array or None'
    462         #assert (indices is None
    463         assert isinstance(indices, (None, list, num.ndarray)), msg
     463        assert isinstance(indices, (NoneType, list, num.ndarray)), msg
    464464
    465465        # Determine which 'set_values_from_...' to use
     
    11881188
    11891189        msg = 'Indices must be a list, array or None'
    1190         #assert indices is None or isinstance(indices, (list, num.ndarray)), msg
    1191         assert isinstance(indices, (list, None, num.ndarray)), msg
     1190        assert isinstance(indices, (NoneType, list, num.ndarray)), msg
    11921191
    11931192        if location == 'centroids':
  • branches/numpy/anuga/utilities/test_polygon.py

    r7035 r7038  
    15051505
    15061506
    1507     def test_inside_polygon_main(self):
     1507    def NOtest_inside_polygon_main(self):
    15081508        # FIXME (Ole): Why is this disabled?
    15091509        #print "inside",inside
Note: See TracChangeset for help on using the changeset viewer.