Changeset 3404


Ignore:
Timestamp:
12/02/08 21:13:29 (12 years ago)
Author:
astephen
Message:

Minor fixes so all tests now work!

Location:
nappy/trunk/nappy/na_file
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/na_file/na_file.py

    r3383 r3404  
    269269        # Set up loop over unbounded indpendent variable 
    270270        m = 0   # Unbounded independent variable mark         
    271         while len(datalines) >0 : 
     271        while len(datalines) > 0: 
    272272            datalines = self._readData1(datalines, m) 
    273273            datalines = self._readData2(datalines, m) 
  • nappy/trunk/nappy/na_file/na_file_1020.py

    r3356 r3404  
    4545        """ 
    4646        # Now get the dependent variables 
    47         raise "I need tidying up as my indentation is wrong! - 1020._readData2!" 
    4847        (v, rtlines) = nappy.utils.text_parser.readItemsFromUnknownLines(datalines, self.NV * self.NVPM, float)               
    4948        count = 0 
    5049        for n in range(self.NV): 
    51             #self.V[n].append([]) 
    5250            for i in range(self.NVPM):   # Number of steps where independent variable is implied 
    5351                self.V[n].append(v[count])                                               
  • nappy/trunk/nappy/na_file/na_file_2160.py

    r3385 r3404  
    118118        """ 
    119119        # Set up unbounded IV loop 
    120         raise "CAREFUL IN 2160.writeData() - check indentation is correct after re-factoring" 
    121120        for m in range(len(self.X)): 
    122121            # Write Independent variable mark and auxiliary variables 
     
    132131            for a in range(self.NAUXC): 
    133132                var_string = ("%s    " % self.A[(self.NAUXV - self.NAUXC) + a][m]) 
    134  
    135             self.file.write("%s\n" % var_string.rstrip()) 
     133                self.file.write("%s\n" % var_string.rstrip()) 
    136134 
    137135            # Write second independant variable and dependant variables 
    138136            for p in range(self.NX[m]): 
    139                 var_string = "%s%s"   %(self.X[m][1][p],self.delimiter) 
     137                var_string = "%s%s"  % (self.X[m][1][p], self.delimiter) 
     138                for n in range(self.NV): 
     139                    var_string = var_string + ("%s    " % self.V[n][m][p]) 
    140140 
    141                 for n in range(self.NV): 
    142                     var_string = var_string + ("%s    " %self.V[n][m][p]) 
    143  
    144                 self.file.write("%s    \n" %var_string) 
     141                self.file.write("%s    \n" % var_string) 
Note: See TracChangeset for help on using the changeset viewer.