def _convert_when(when):
#Test to see if when has already been converted to ndarray
#This will happen if one function calls another, for example ppmt
if isinstance(when, np.ndarray):
return when
try:
return _when_to_num[when]
except (KeyError, TypeError):
return [_when_to_num[x] for x in when]
评论列表
文章目录