New operator: the kernels can be multiplied directly with the '*' character

This commit is contained in:
Nicolas 2013-01-30 17:41:51 +00:00
parent c4f0a9bbc2
commit f4b6568ee9
5 changed files with 79 additions and 7 deletions

View file

@ -94,7 +94,7 @@ class parameterised(object):
Other objects are passed through - i.e. integers which were'nt meant for grepping
"""
if type(expr) is str:
if type(expr) in [str, np.string_, np.str]:
expr = re.compile(expr)
return np.nonzero([expr.search(name) for name in self._get_param_names()])[0]
elif type(expr) is re._pattern_type: