コード例 #1
0
ファイル: defchararray.py プロジェクト: AndreI11/SatStressGui
 def _ismethod(self, name):
     result = empty(self.shape, dtype=bool)
     res = result.flat
     for k, val in enumerate(self.flat):
         item = val.rstrip('\x00')
         res[k] = getattr(item, name)()
     return result
コード例 #2
0
 def _ismethod(self, name):
     result = empty(self.shape, dtype=bool)
     res = result.flat
     for k, val in enumerate(self.flat):
         item = val.rstrip('\x00')
         res[k] = getattr(item, name)()
     return result
コード例 #3
0
ファイル: defchararray.py プロジェクト: AndreI11/SatStressGui
 def _typedmethod(self, name, myiter, dtype):
     result = empty(myiter.shape, dtype=dtype)
     res = result.flat
     for k, val in enumerate(myiter):
         newval = []
         for chk in val[1:]:
             if not chk or (chk.dtype is object_ and chk.item() is None):
                 break
             newval.append(chk)
         this_str = val[0].rstrip('\x00')
         newitem = getattr(this_str, name)(*newval)
         res[k] = newitem
     return result
コード例 #4
0
 def _typedmethod(self, name, myiter, dtype):
     result = empty(myiter.shape, dtype=dtype)
     res = result.flat
     for k, val in enumerate(myiter):
         newval = []
         for chk in val[1:]:
             if not chk or (chk.dtype is object_ and chk.item() is None):
                 break
             newval.append(chk)
         this_str = val[0].rstrip('\x00')
         newitem = getattr(this_str,name)(*newval)
         res[k] = newitem
     return result