Changeset 7276 for anuga_core/source/anuga/caching/caching.py
- Timestamp:
- Jun 30, 2009, 2:07:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/caching/caching.py
r7197 r7276 51 51 unix = True 52 52 53 import Numericas num53 import numpy as num 54 54 55 55 … … 1394 1394 I.sort() 1395 1395 val = myhash(I, ids) 1396 elif type(T) == num.ArrayType:1396 elif isinstance(T, num.ndarray): 1397 1397 T = num.array(T) # Ensure array is contiguous 1398 1398 … … 1465 1465 identical = compare(a, b, ids) 1466 1466 1467 elif type(A) == num.ArrayType:1467 elif isinstance(A, num.ndarray): 1468 1468 # Use element by element comparison 1469 1469 identical = num.alltrue(A==B) … … 2439 2439 argstr = argstr + "'"+str(args)+"'" 2440 2440 else: 2441 # Truncate large Numeric arrays before using str()2442 if type(args) == num.ArrayType:2441 # Truncate large numeric arrays before using str() 2442 if isinstance(args, num.ndarray): 2443 2443 # if len(args.flat) > textwidth: 2444 2444 # Changed by Duncan and Nick 21/2/07 .flat has problems with
Note: See TracChangeset
for help on using the changeset viewer.