Ignore:
Timestamp:
Jun 30, 2009, 2:07:41 PM (15 years ago)
Author:
ole
Message:

Merged numpy branch back into the trunk.

In ~/sandpit/anuga/anuga_core/source
svn merge -r 6246:HEAD ../../branches/numpy .

In ~/sandpit/anuga/anuga_validation
svn merge -r 6417:HEAD ../branches/numpy_anuga_validation .

In ~/sandpit/anuga/misc
svn merge -r 6809:HEAD ../branches/numpy_misc .

For all merges, I used numpy version where conflicts existed

The suites test_all.py (in source/anuga) and validate_all.py passed using Python2.5 with numpy on my Ubuntu Linux box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/tools/pytools/test_pytools.py

    r18 r7276  
    11import unittest
    2 import Numeric
     2import numpy as num
    33from combinatorics import bitvector
    44from numtools import expand
     
    1414
    1515        d = 4
    16         assert Numeric.allclose(bitvector(0, d), Numeric.array([0,0,0,0]))
    17         assert Numeric.allclose(bitvector(1, d), Numeric.array([1,0,0,0]))
    18         assert Numeric.allclose(bitvector(2, d), Numeric.array([0,1,0,0]))
    19         assert Numeric.allclose(bitvector(3, d), Numeric.array([1,1,0,0]))
    20         assert Numeric.allclose(bitvector(4, d), Numeric.array([0,0,1,0]))
    21         assert Numeric.allclose(bitvector(5, d), Numeric.array([1,0,1,0]))
    22         assert Numeric.allclose(bitvector(6, d), Numeric.array([0,1,1,0]))
    23         assert Numeric.allclose(bitvector(7, d), Numeric.array([1,1,1,0]))
    24         assert Numeric.allclose(bitvector(8, d), Numeric.array([0,0,0,1]))
    25         assert Numeric.allclose(bitvector(9, d), Numeric.array([1,0,0,1]))
    26         assert Numeric.allclose(bitvector(10, d), Numeric.array([0,1,0,1]))
    27         assert Numeric.allclose(bitvector(11, d), Numeric.array([1,1,0,1]))
    28         assert Numeric.allclose(bitvector(12, d), Numeric.array([0,0,1,1]))
    29         assert Numeric.allclose(bitvector(13, d), Numeric.array([1,0,1,1]))
    30         assert Numeric.allclose(bitvector(14, d), Numeric.array([0,1,1,1]))
    31         assert Numeric.allclose(bitvector(15, d), Numeric.array([1,1,1,1]))
     16        assert num.allclose(bitvector(0, d), num.array([0,0,0,0]))
     17        assert num.allclose(bitvector(1, d), num.array([1,0,0,0]))
     18        assert num.allclose(bitvector(2, d), num.array([0,1,0,0]))
     19        assert num.allclose(bitvector(3, d), num.array([1,1,0,0]))
     20        assert num.allclose(bitvector(4, d), num.array([0,0,1,0]))
     21        assert num.allclose(bitvector(5, d), num.array([1,0,1,0]))
     22        assert num.allclose(bitvector(6, d), num.array([0,1,1,0]))
     23        assert num.allclose(bitvector(7, d), num.array([1,1,1,0]))
     24        assert num.allclose(bitvector(8, d), num.array([0,0,0,1]))
     25        assert num.allclose(bitvector(9, d), num.array([1,0,0,1]))
     26        assert num.allclose(bitvector(10, d), num.array([0,1,0,1]))
     27        assert num.allclose(bitvector(11, d), num.array([1,1,0,1]))
     28        assert num.allclose(bitvector(12, d), num.array([0,0,1,1]))
     29        assert num.allclose(bitvector(13, d), num.array([1,0,1,1]))
     30        assert num.allclose(bitvector(14, d), num.array([0,1,1,1]))
     31        assert num.allclose(bitvector(15, d), num.array([1,1,1,1]))
    3232       
    3333
     
    3535
    3636        d = 4
    37         mask = Numeric.array([0,1,1,0,1])
    38         v = Numeric.array([2,3,4])
     37        mask = num.array([0,1,1,0,1])
     38        v = num.array([2,3,4])
    3939
    40         assert Numeric.allclose(expand(v, mask), Numeric.array([0,2,3,0,4]))
     40        assert num.allclose(expand(v, mask), num.array([0,2,3,0,4]))
    4141
    4242
Note: See TracChangeset for help on using the changeset viewer.