Commit 0b7fea73 authored by Marco Selig's avatar Marco Selig

transparent backgound fixed; pool KeyboardInterrupt fixed.

parent ed80f6d7
This diff is collapsed.
...@@ -2124,25 +2124,31 @@ class explicit_probing(probing): ...@@ -2124,25 +2124,31 @@ class explicit_probing(probing):
return self.probing(zipped[0],probe) return self.probing(zipped[0],probe)
def _serial_probing(self,zipped): ## > performs the probing operation serially def _serial_probing(self,zipped): ## > performs the probing operation serially
result = self._single_probing(zipped) try:
if(result is not None): result = self._single_probing(zipped)
result = np.array(result).flatten(order='C') except Exception as exception:
rindex = zipped[0]*self.codomain.dim(split=False) raise exception
if(isinstance(_share.mat,tuple)): except BaseException: ## capture system-exiting exception including KeyboardInterrupt
_share.mat[0].acquire(block=True,timeout=None) raise Exception(about._errors.cstring("ERROR: unknown."))
_share.mat[0][rindex:rindex+self.codomain.dim(split=False)] = np.real(result) else:
_share.mat[0].release() if(result is not None):
_share.mat[1].acquire(block=True,timeout=None) result = np.array(result).flatten(order='C')
_share.mat[1][rindex:rindex+self.codomain.dim(split=False)] = np.imag(result) rindex = zipped[0]*self.codomain.dim(split=False)
_share.mat[1].release() if(isinstance(_share.mat,tuple)):
else: _share.mat[0].acquire(block=True,timeout=None)
_share.mat.acquire(block=True,timeout=None) _share.mat[0][rindex:rindex+self.codomain.dim(split=False)] = np.real(result)
_share.mat[rindex:rindex+self.codomain.dim(split=False)] = result _share.mat[0].release()
_share.mat.release() _share.mat[1].acquire(block=True,timeout=None)
_share.num.acquire(block=True,timeout=None) _share.mat[1][rindex:rindex+self.codomain.dim(split=False)] = np.imag(result)
_share.num.value += 1 _share.mat[1].release()
_share.num.release() else:
self._progress(_share.num.value) _share.mat.acquire(block=True,timeout=None)
_share.mat[rindex:rindex+self.codomain.dim(split=False)] = result
_share.mat.release()
_share.num.acquire(block=True,timeout=None)
_share.num.value += 1
_share.num.release()
self._progress(_share.num.value)
def _parallel_probing(self): ## > performs the probing operations in parallel def _parallel_probing(self): ## > performs the probing operations in parallel
## define weighted canonical base ## define weighted canonical base
......
Markdown is supported
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