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
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
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