diff --git a/nifty_core.py b/nifty_core.py index 4a72131b8704d31455199fcd7dfd38430ed8d59c..3b6b96cd59d4dfa65b7165b48a9dcc925c4d60aa 100644 --- a/nifty_core.py +++ b/nifty_core.py @@ -514,7 +514,7 @@ class _about(object): ## nifty support class for global settings """ ## version - self._version = "0.9.0" + self._version = "0.9.2" ## switches and notifications self._errors = notification(default=True,ccode=notification._code) @@ -1238,7 +1238,7 @@ class space(object): 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))+"' ).")) else: - x = x.val + x = np.copy(x.val,order='C') else: raise ValueError(about._errors.cstring("ERROR: inequal domains.")) else: @@ -5952,7 +5952,7 @@ class nested_space(space): for ii in xrange(len(self.nest)): reorder += range(lim[ii][0],lim[ii][1]) ## permute - Tx = np.copy(x) + Tx = np.copy(x,order='C') for ii in xrange(len(reorder)): while(reorder[ii]!=ii): Tx = np.swapaxes(Tx,ii,reorder[ii]) diff --git a/nifty_explicit.py b/nifty_explicit.py index 29c5dd5ba231deb45e45ec64a468b5b85056012a..09fe1dae57b137168d014f0d48a25e012cd0070f 100644 --- a/nifty_explicit.py +++ b/nifty_explicit.py @@ -691,7 +691,7 @@ class explicit_operator(operator): 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): """ diff --git a/nifty_tools.py b/nifty_tools.py index 582fdee054f3422aa4173d1e249f0d8d7527c510..5a4667cf45e3c5e27507e0c3e90ef5172e8f79d0 100644 --- a/nifty_tools.py +++ b/nifty_tools.py @@ -749,7 +749,7 @@ class conjugate_gradient(object): gamma = r.dot(d) if(gamma==0): return self.x,clevel+1 - delta_ = np.absolute(gamma)**(-0.5) + delta_ = self.b.norm**(-1)#np.absolute(gamma)**(-0.5) ## independent convergence = 0 ii = 1 @@ -815,7 +815,7 @@ class conjugate_gradient(object): gamma = r.dot(d) if(gamma==0): return self.x,clevel+1 - delta_ = np.absolute(gamma)**(-0.5) + delta_ = self.b.norm**(-1)#np.absolute(gamma)**(-0.5) ## independent convergence = 0 ii = 1