Python equivalents to MATLAB str2func, func2str, ischar, isfunc?
Travis Oliphant
oliphant.travis at ieee.org
Wed Mar 14 13:14:17 EDT 2007
dmitrey wrote:
> I can't find these via web serch
>
You won't find exact equivalents. But, the same functionality is
available. Perhaps you would like to show us what you are trying to do
in Python.
Python's eval has some similarity with str2func
Python's repr() or str() has some similarity with func2str
ischar(A) is similiar to isinstance(A, str)
isfunc is similiar to callable
-Travis
P.S. (if you are using NumPy, then there are other possibilities as well.
More information about the Python-list
mailing list