Commit 002a8512 authored by Marco Selig's avatar Marco Selig
Browse files

typo and cg issues fixed.

parent b47f67fd
...@@ -514,7 +514,7 @@ class _about(object): ## nifty support class for global settings ...@@ -514,7 +514,7 @@ class _about(object): ## nifty support class for global settings
""" """
## version ## version
self._version = "0.9.0" self._version = "0.9.2"
## switches and notifications ## switches and notifications
self._errors = notification(default=True,ccode=notification._code) self._errors = notification(default=True,ccode=notification._code)
...@@ -1238,7 +1238,7 @@ class space(object): ...@@ -1238,7 +1238,7 @@ class space(object):
if(self.datatype is not x.domain.datatype): if(self.datatype is not x.domain.datatype):
raise TypeError(about._errors.cstring("ERROR: inequal data types ( '"+str(np.result_type(self.datatype))+"' <> '"+str(np.result_type(x.domain.datatype))+"' ).")) raise TypeError(about._errors.cstring("ERROR: inequal data types ( '"+str(np.result_type(self.datatype))+"' <> '"+str(np.result_type(x.domain.datatype))+"' )."))
else: else:
x = x.val x = np.copy(x.val,order='C')
else: else:
raise ValueError(about._errors.cstring("ERROR: inequal domains.")) raise ValueError(about._errors.cstring("ERROR: inequal domains."))
else: else:
...@@ -5952,7 +5952,7 @@ class nested_space(space): ...@@ -5952,7 +5952,7 @@ class nested_space(space):
for ii in xrange(len(self.nest)): for ii in xrange(len(self.nest)):
reorder += range(lim[ii][0],lim[ii][1]) reorder += range(lim[ii][0],lim[ii][1])
## permute ## permute
Tx = np.copy(x) Tx = np.copy(x,order='C')
for ii in xrange(len(reorder)): for ii in xrange(len(reorder)):
while(reorder[ii]!=ii): while(reorder[ii]!=ii):
Tx = np.swapaxes(Tx,ii,reorder[ii]) Tx = np.swapaxes(Tx,ii,reorder[ii])
......
...@@ -691,7 +691,7 @@ class explicit_operator(operator): ...@@ -691,7 +691,7 @@ class explicit_operator(operator):
If it is no square matrix. If it is no square matrix.
""" """
return self._inverse_adjoint_times(x,**kwargs) return self.inverse_adjoint_times(x,**kwargs)
def inverse_adjoint_times(self,x,**kwargs): def inverse_adjoint_times(self,x,**kwargs):
""" """
......
...@@ -749,7 +749,7 @@ class conjugate_gradient(object): ...@@ -749,7 +749,7 @@ class conjugate_gradient(object):
gamma = r.dot(d) gamma = r.dot(d)
if(gamma==0): if(gamma==0):
return self.x,clevel+1 return self.x,clevel+1
delta_ = np.absolute(gamma)**(-0.5) delta_ = self.b.norm**(-1)#np.absolute(gamma)**(-0.5) ## independent
convergence = 0 convergence = 0
ii = 1 ii = 1
...@@ -815,7 +815,7 @@ class conjugate_gradient(object): ...@@ -815,7 +815,7 @@ class conjugate_gradient(object):
gamma = r.dot(d) gamma = r.dot(d)
if(gamma==0): if(gamma==0):
return self.x,clevel+1 return self.x,clevel+1
delta_ = np.absolute(gamma)**(-0.5) delta_ = self.b.norm**(-1)#np.absolute(gamma)**(-0.5) ## independent
convergence = 0 convergence = 0
ii = 1 ii = 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment