Changeset 7520 for anuga_core/source/anuga/shallow_water/data_manager.py
- Timestamp:
- Sep 21, 2009, 7:19:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r7519 r7520 2487 2487 # change printoptions so that a long string of zeros in not 2488 2488 # summarized as [0.0, 0.0, 0.0, ... 0.0, 0.0, 0.0] 2489 printoptions = num.get_printoptions() 2490 num.set_printoptions(threshold=sys.maxint) 2491 2489 #printoptions = num.get_printoptions() 2490 #num.set_printoptions(threshold=sys.maxint) 2491 2492 format = '%.'+'%g' % number_of_decimal_places +'e' 2492 2493 for i in range(nrows): 2493 2494 if verbose and i % ((nrows+10)/10) == 0: … … 2497 2498 2498 2499 slice = grid_values[base_index:base_index+ncols] 2499 #s = array2string(slice, max_line_width=sys.maxint) 2500 2501 s = num.array2string(slice, max_line_width=sys.maxint, 2502 precision=number_of_decimal_places) 2503 ascid.write(s[1:-1] + '\n') 2504 2505 num.set_printoptions(threshold=printoptions['threshold']) 2500 2501 num.savetxt(ascid, slice.reshape(1,ncols), format, ' ' ) 2502 2506 2503 2507 2504 #Close
Note: See TracChangeset
for help on using the changeset viewer.