- Timestamp:
- 02/15/16 20:12:31 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/utils.py
r2456 r3093 16 16 17 17 def _is_sequence_or_number(param, ptype=int): 18 if isinstance(param,tuple) or isinstance(param,list): 18 import numpy 19 #if isinstance(param,tuple) or isinstance(param,list): 20 if type(param) in (tuple, list, numpy.ndarray): 19 21 if len(param) == 0: return True # empty list 20 22 out = True … … 31 33 else: return [param] 32 34 if _is_sequence_or_number(param, ptype): 33 return param35 return list(param) 34 36 return None 35 37
Note:
See TracChangeset
for help on using the changeset viewer.