Index: ../trunk-jpl/src/m/classes/inversion.py
===================================================================
--- ../trunk-jpl/src/m/classes/inversion.py	(revision 13641)
+++ ../trunk-jpl/src/m/classes/inversion.py	(revision 13642)
@@ -95,10 +95,10 @@
 		#usually the gradient_scaling must be of the order of magnitude of the 
 		#inversed parameter (10^8 for B, 50 for drag) and can be decreased
 		#after the first iterations
-		self.gradient_scaling=50*numpy.ones(self.nsteps)
+		self.gradient_scaling=50*numpy.ones((self.nsteps,1))
 
 		#several responses can be used:
-		self.cost_functions=101*numpy.ones(self.nsteps)
+		self.cost_functions=101*numpy.ones((self.nsteps,1))
 
 		#step_threshold is used to speed up control method. When
 		#misfit(1)/misfit(0) < self.step_threshold, we go directly to
@@ -123,7 +123,7 @@
 			return md
 
 		num_controls=numpy.size(md.inversion.control_parameters)
-		num_costfunc=numpy.size(md.inversion.cost_functions,1)
+		num_costfunc=numpy.size(md.inversion.cost_functions,axis=1)
 
 		md = checkfield(md,'inversion.iscontrol','values',[0,1])
 		md = checkfield(md,'inversion.tao','values',[0,1])
@@ -176,7 +176,7 @@
 		WriteData(fid,'data',num_control_parameters,'enum',InversionNumControlParametersEnum(),'format','Integer')
 
 		#process cost functions
-		num_cost_functions=numpy.size(self.cost_functions,1)
+		num_cost_functions=numpy.size(self.cost_functions,axis=1)
 		data=self.cost_functions
 		data[numpy.nonzero(data==101)]=SurfaceAbsVelMisfitEnum()
 		data[numpy.nonzero(data==102)]=SurfaceRelVelMisfitEnum()
