- Timestamp:
- Feb 28, 2019, 5:57:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2372 r2373 15291 15291 for dimn in intdims.keys(): 15292 15292 slicev = range(0,dims[dimn],intdims[dimn]) 15293 if np.mod(dims[dimn],intdims[dimn]) != 0: slicev.append(dims[dimn]) 15293 Nslcs = len(slicev) 15294 if slicev[Nslcs-1] != dims[dimn]: slicev.append(dims[dimn]) 15294 15295 15295 15296 intslices[dimn] = slicev … … 15353 15354 return slices, inddims 15354 15355 15355 #slcs, inds = range_slicing(['z', 't', 'y', 'x'], [2, 3, 10, 20], {'x': 5, 'y': 7})15356 #slcs, inds = range_slicing(['z', 't', 'y', 'x'], [2, 3, 300, 300], {'y': 50}) 15356 15357 #Nslcs = len(slcs) 15357 15358 #for i in range(Nslcs): … … 15359 15360 # for j in range(4): 15360 15361 # print ' ' , '(', inds[i,j,0], ',', inds[i,j,1], ')' 15361 #print range_slicing(['z', 't', 'y', 'x'], [2, 3, 10, 20], {'x': 5, 'y': 7})15362 15363 15362 #quit() 15364 15363
Note: See TracChangeset
for help on using the changeset viewer.