Changeset 6817
- Timestamp:
- Apr 16, 2009, 8:49:58 AM (16 years ago)
- Location:
- branches/numpy_misc/tools/write_large_files
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_misc/tools/write_large_files/rw_big_file.py
r6739 r6817 7 7 import getopt 8 8 import time 9 import Numeric9 import numpy as num 10 10 import Scientific.IO.NetCDF as nc 11 11 … … 59 59 def read_file(filename, variable_size, num_variables): 60 60 # create a data array slice 61 slice_array_mask = Numeric.ones((XDIM,), 'd')61 slice_array_mask = numpy.ones((XDIM,), 'd') 62 62 63 63 # if timing file read, get start time … … 102 102 103 103 var_array = fid.variables[varname][index,:] 104 if var_array != slice_array:104 if num.any(var_array != slice_array): 105 105 result = False 106 106 if Verbose: … … 148 148 149 149 # create a data array slice 150 slice_array_mask = Numeric.ones((XDIM,), 'd')150 slice_array_mask = numpy.ones((XDIM,), 'd') 151 151 152 152 # if timing file write, remember start time -
branches/numpy_misc/tools/write_large_files/rwi4_big_file.py
r6739 r6817 17 17 import getopt 18 18 import time 19 import Numeric19 import numpy as num 20 20 import Scientific.IO.NetCDF as nc 21 21 … … 61 61 def read_file(filename, variable_size, num_variables): 62 62 # create a data array slice 63 slice_array_mask = Numeric.ones((XDIM,), 'd')63 slice_array_mask = num.ones((XDIM,), 'd') 64 64 65 65 # if timing file read, get start time … … 98 98 # var_array = fid.variables[varname][slice_number,:] 99 99 var_array = var[slice_number,:] 100 if var_array != slice_array:100 if num.any(var_array != slice_array): 101 101 print 'Read variable %s, slice %d: got unexpected value' % \ 102 102 (varname, slice_number) … … 134 134 135 135 # create a data array slice 136 slice_array_mask = Numeric.ones((XDIM,), 'd')136 slice_array_mask = num.ones((XDIM,), 'd') 137 137 138 138 # if timing file write, remember start time -
branches/numpy_misc/tools/write_large_files/rwi_big_file.py
r6739 r6817 17 17 import getopt 18 18 import time 19 import Numeric19 import numpy as num 20 20 import Scientific.IO.NetCDF as nc 21 21 … … 61 61 def read_file(filename, variable_size, num_variables): 62 62 # create a data array slice 63 slice_array_mask = Numeric.ones((XDIM,), 'd')63 slice_array_mask = num.ones((XDIM,), 'd') 64 64 65 65 # if timing file read, get start time … … 98 98 99 99 var_array = fid.variables[varname][slice_number,:] 100 if var_array != slice_array:100 if num.any(var_array != slice_array): 101 101 result = False 102 102 if Verbose: … … 141 141 142 142 # create a data array slice 143 slice_array_mask = Numeric.ones((XDIM,), 'd')143 slice_array_mask = num.ones((XDIM,), 'd') 144 144 145 145 # if timing file write, remember start time -
branches/numpy_misc/tools/write_large_files/rwil_big_file.py
r6739 r6817 17 17 import getopt 18 18 import time 19 import Numeric19 import numpy as num 20 20 import Scientific.IO.NetCDF as nc 21 21 … … 61 61 def read_file(filename, variable_size, num_variables): 62 62 # create a data array slice 63 slice_array_mask = Numeric.ones((XDIM,), 'd')63 slice_array_mask = num.ones((XDIM,), 'd') 64 64 65 65 # if timing file read, get start time … … 97 97 var_array = fid.variables[varname][slice_number,:] 98 98 99 if var_array != slice_array:99 if num.any(var_array != slice_array): 100 100 print 'Read variable %s, slice %d: got unexpected value' % \ 101 101 (varname, slice_number) … … 133 133 134 134 # create a data array slice 135 slice_array_mask = Numeric.ones((XDIM,), 'd')135 slice_array_mask = num.ones((XDIM,), 'd') 136 136 137 137 # if timing file write, remember start time -
branches/numpy_misc/tools/write_large_files/write_big_file.py
r6739 r6817 7 7 import getopt 8 8 import time 9 import Numeric9 import numpy as num 10 10 import Scientific.IO.NetCDF as nc 11 11 … … 54 54 55 55 # create a data array slice 56 slice_array = Numeric.ones((XDIM,), 'i')56 slice_array = num.ones((XDIM,), 'i') 57 57 58 58 # if timing file write, remember start time
Note: See TracChangeset
for help on using the changeset viewer.