Changeset 5897 for anuga_core/source/anuga/utilities/test_system_tools.py
- Timestamp:
- Nov 6, 2008, 12:17:15 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/test_system_tools.py
r5891 r5897 1 1 #!/usr/bin/env python 2 2 3 3 4 import unittest 4 import numpy 5 from Numeric import zeros, array, allclose, Float 5 6 import zlib 6 7 from os.path import join, split, sep … … 80 81 pass 81 82 else: 82 test_array = numpy.array([[7.0, 3.14], [-31.333, 0.0]])83 test_array = array([[7.0, 3.14], [-31.333, 0.0]]) 83 84 84 85 # First file … … 86 87 fid = NetCDFFile(filename1, 'w') 87 88 fid.createDimension('two', 2) 88 fid.createVariable('test_array', numpy.dtype(numpy.float).char, ('two', 'two')) 89 fid.createVariable('test_array', Float, 90 ('two', 'two')) 89 91 fid.variables['test_array'][:] = test_array 90 92 fid.close() … … 94 96 fid = NetCDFFile(filename2, 'w') 95 97 fid.createDimension('two', 2) 96 fid.createVariable('test_array', numpy.dtype(numpy.float).char, ('two', 'two')) 98 fid.createVariable('test_array', Float, 99 ('two', 'two')) 97 100 fid.variables['test_array'][:] = test_array 98 101 fid.close()
Note: See TracChangeset
for help on using the changeset viewer.