Ignore:
Timestamp:
Jan 13, 2009, 12:12:15 PM (15 years ago)
Author:
rwilson
Message:

Change Numeric imports to general form - ready to change to NumPy?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/caching/test_caching.py

    r5897 r6148  
    11
    22import unittest
    3 from Numeric import arange, array
    43
    54from copy import deepcopy
     
    76from anuga.caching import *
    87from anuga.caching.dummy_classes_for_testing import Dummy, Dummy_memorytest
     8
     9import Numeric as num
    910
    1011
     
    128129       
    129130        # Make some test input arguments
    130         A0 = arange(5)
    131         B0 = array([1.1, 2.2, 0.0, -5, -5])
     131        A0 = num.arange(5)
     132        B0 = num.array([1.1, 2.2, 0.0, -5, -5])
    132133       
    133134        A1 = A0.copy()
     
    172173       
    173174        # Make test input arguments
    174         A0 = arange(5)*1.0
     175        A0 = num.arange(5)*1.0
    175176        B = ('x', 15)
    176177       
    177178        # Create different A that hashes to the same address (having the same average)
    178         A1 = array([2.0, 2.0, 2.0, 2.0, 2.0])       
     179        A1 = num.array([2.0, 2.0, 2.0, 2.0, 2.0])       
    179180       
    180181        assert myhash(A0) == myhash(A1)
     
    389390        A = Dummy(5, 7)
    390391        B = {'x': 10, 'A': A}
    391         C = [B, array([1.2, 3, 5, 0.1])]
     392        C = [B, num.array([1.2, 3, 5, 0.1])]
    392393        A.value = C # Make it circular
    393394
     
    395396        AA = Dummy(None, None)
    396397        BB = {'A': AA, 'x': 10}
    397         CC = [BB, array([1.200, 3.000, 5.00, 1.0/10])]
     398        CC = [BB, num.array([1.200, 3.000, 5.00, 1.0/10])]
    398399        AA.value = CC # Make it circular
    399400        AA.another = 3+4       
Note: See TracChangeset for help on using the changeset viewer.