support args as dictionary in addition to list
allow more types of functions (eg cython generated 'builtin functions' to be used as callback functions for the hamiltonian in td-func format