Ignore:
Timestamp:
Mar 14, 2006, 4:37:49 PM (19 years ago)
Author:
ole
Message:

Got utilities to compile and pass all tests using numpy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation-numpy-branch/utilities/numerical_tools.py

    r2533 r2545  
    88#(this should move to somewhere central)
    99try:
    10     from scipy import ArrayType, array, sum, innerproduct, ravel, sqrt, searchsorted, sort, concatenate   
     10    from numpy import ArrayType, array, sum, innerproduct, ravel, sqrt, searchsorted, sort, concatenate   
    1111except:
    12     print 'Could not find scipy - using Numeric'
     12    print 'Could not find numpy - using Numeric'
    1313    from Numeric import ArrayType, array, sum, innerproduct, ravel, sqrt, searchsorted, sort, concatenate   
    1414   
     
    181181    else:
    182182        if type(A) == ArrayType:
    183             if A.typecode == typecode:
     183            if A.dtype.char == typecode:
    184184                return array(A)  #FIXME: Shouldn't this just return A?
    185185            else:
     
    242242#Initialise module
    243243
    244 from utilities import compile
     244#from utilities import compile
     245import compile
    245246if compile.can_use_C_extension('util_ext.c'):
    246247    from util_ext import gradient, gradient2
Note: See TracChangeset for help on using the changeset viewer.