original_docstring:  Main load function: collect all files in multiple directories,
  			and load the necessary fraction; potentially rescale (zoom) data, if enabled
  		
docstring: Main load function: collect all files in multiple directories,
  and load the necessary fraction; potentially rescale (zoom) data, if enabled
docstring_tokens: Main load function : collect all files in multiple directories and load the necessary fraction ; potentially rescale ( zoom ) data if enabled
code: def loadDirs(self):
  		""" Main load function: collect all files in multiple directories,
  			and load the necessary fraction; potentially rescale (zoom) data, if enabled
  		"""
  		self.xfn = []
  		self.yfn = []
  		currDir = os.getcwd()
  
  		for i in range(len(self.indices)):
  			self.collectFilenamesFromDir( i )
  			os.chdir( currDir )
  			
  		# debug info, print full lists
  		if self.print_info>1:
  			#print("Full list x: "+format(self.xfn)) print("Full list y: "+format(self.yfn))
  			print( "\nfilenames x:" ); print( ("\n".join(self.xfn)) )
  			if self.filename_y is not None:
  				print( "\nfilenames y:" ); print( ("\n".join(self.yfn)) )
  
  		self.loadFiles()
  		os.chdir( currDir )
  
  		# remove z axis of all 3D data fields for whole data vector
  		if self.collapse_z:
  			if self.getDim(self.x[0].shape)==2:
  				self.x = np.reshape( self.x, [self.x.shape[0], self.shape[1],self.shape[2],self.shape[3]] ) # remove z-axis for x
  			if self.have_y_npz and self.getDim(self.y[0].shape)==2:
  				self.y = np.reshape( self.y, [self.y.shape[0], self.shape_y[1],self.shape_y[2],self.shape_y[3]] )
  
  		# do manual shuffling once (needs to reorder x,y and filenames for x,y)
  		if self.shuffle_on_load:
  			idxr = np.random.permutation(self.x.shape[0])
  			self.x = self.x[idxr]
  			if self.have_y_npz: self.y = self.y[idxr] # y is np array , reorder...
  
  			xfn2,yfn2,y2 = [],[],[]
  			for i in range(len(self.xfn)):
  				xfn2.append( self.xfn[idxr[i]] )
  				if not self.have_y_npz and self.y is not None: y2.append( self.y[idxr[i]] ) # non np array y
  				if self.filename_y is not None: yfn2.append( self.yfn[idxr[i]] )
  			self.xfn, self.yfn = xfn2,yfn2
  			if not self.have_y_npz and self.y is not None: self.y = y2
  		# loading done
  
code_tokens: def loadDirs ( self ) : self . xfn = [ ] self . yfn = [ ] currDir = os . getcwd ( ) for i in range ( len ( self . indices ) ) : self . collectFilenamesFromDir ( i ) os . chdir ( currDir ) if self . print_info > 1 : print ( "\nfilenames x:" ) ; print ( ( "\n" . join ( self . xfn ) ) ) if self . filename_y is not None : print ( "\nfilenames y:" ) ; print ( ( "\n" . join ( self . yfn ) ) ) self . loadFiles ( ) os . chdir ( currDir ) if self . collapse_z : if self . getDim ( self . x [ 0 ] . shape ) == 2 : self . x = np . reshape ( self . x , [ self . x . shape [ 0 ] , self . shape [ 1 ] , self . shape [ 2 ] , self . shape [ 3 ] ] ) if self . have_y_npz and self . getDim ( self . y [ 0 ] . shape ) == 2 : self . y = np . reshape ( self . y , [ self . y . shape [ 0 ] , self . shape_y [ 1 ] , self . shape_y [ 2 ] , self . shape_y [ 3 ] ] ) if self . shuffle_on_load : idxr = np . random . permutation ( self . x . shape [ 0 ] ) self . x = self . x [ idxr ] if self . have_y_npz : self . y = self . y [ idxr ] xfn2 , yfn2 , y2 = [ ] , [ ] , [ ] for i in range ( len ( self . xfn ) ) : xfn2 . append ( self . xfn [ idxr [ i ] ] ) if not self . have_y_npz and self . y is not None : y2 . append ( self . y [ idxr [ i ] ] ) if self . filename_y is not None : yfn2 . append ( self . yfn [ idxr [ i ] ] ) self . xfn , self . yfn = xfn2 , yfn2 if not self . have_y_npz and self . y is not None : self . y = y2
short_docstring: Main load function: collect all files in multiple directories,
  and load the necessary fraction; potentially rescale (zoom) data, if enabled
short_docstring_tokens: Main load function : collect all files in multiple directories and load the necessary fraction ; potentially rescale ( zoom ) data if enabled
comment: """ Main load function: collect all files in multiple directories,
  			and load the necessary fraction; potentially rescale (zoom) data, if enabled
  		"""$SEP$# debug info, print full lists
  $SEP$#print("Full list x: "+format(self.xfn)) print("Full list y: "+format(self.yfn))
  $SEP$# remove z axis of all 3D data fields for whole data vector
  $SEP$# remove z-axis for x
  $SEP$# do manual shuffling once (needs to reorder x,y and filenames for x,y)
  $SEP$# y is np array , reorder...
  $SEP$# non np array y
  $SEP$# loading done
  