Ignore:
Timestamp:
Jul 12, 2009, 10:53:38 PM (15 years ago)
Author:
ole
Message:

Tested ANUGA/numpy for Python2.6 on Ubuntu 9.04 and fixed up remaining errors.
In short, they had to do with hasattr, which now can raise a proper exception and the rest
was situations where numpy.int32 had to be converted to a proper int.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/test_polygon.py

    r7276 r7308  
    304304        points = [[0.5, 0.5], [1, -0.5], [1.5, 0], [0.5, 1.5], [0.5, -0.5]]
    305305        res = inside_polygon( points, polygon, verbose=False )
    306         assert num.allclose( res, [0,1,2] )
     306        assert num.allclose(res, [0,1,2])
    307307
    308308    def test_outside_polygon(self):
     
    585585        points = [(1., 0.25),(1., 0.75)]
    586586        inside, outside = in_and_outside_polygon(points, polygon, closed=True)
    587         assert (inside, [0,1])
     587        assert num.alltrue(inside == [0,1])
    588588        assert len(outside) == 0
    589589
    590590        inside, outside = in_and_outside_polygon(points, polygon, closed=False)
    591591        assert len(inside) == 0
    592         assert (outside, [0,1])
     592        assert num.alltrue(outside == [0,1])
    593593
    594594        points = [(100., 0.25), (0.5, 0.5) ]
    595595        inside, outside = in_and_outside_polygon(points, polygon)
    596         assert (inside, [1])
     596        assert num.alltrue(inside == [1])
    597597        assert outside[0] == 0
    598598
    599599        points = [(100., 0.25),(0.5, 0.5), (39,20), (0.6,0.7),(56,43),(67,90)]
    600600        inside, outside = in_and_outside_polygon(points, polygon)
    601         assert (inside, [1, 3])
    602         assert (outside, [0, 2, 4, 5])
     601        assert num.alltrue(inside == [1, 3])
     602        assert num.alltrue(outside == [0, 2, 4, 5])
    603603
    604604    def test_intersection1(self):
Note: See TracChangeset for help on using the changeset viewer.