-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python interface to RHEOS #116
Comments
The use of Unicode symbols makes it more complicated to call RHEOS from the Python REPL. The epsilon symbol seems in particular to be problematic for some reason.
This may be due to the fact that there are different symbols for epsilon that python aggregates together, but not julia:
Python interprets in the same way \epsilon and \varepsilon, but not Julia. |
Here is a Python code sample that works fine so far. Translation to unicode is in place. Modelfit takes parameters as dictionary too which are better integrated with python. getparams also has a new keyword to return a dictionary rather than a namedtuple. It seems to be more or less usable now.
|
Rather than adding keywords in functions such as getparams to provide dictionaries for python users, it may be simpler to include helper functions that can easily and convert namedtuples and dictionaries. New syntaxes would be:
Note that Julia's NamedTuples are functional in python and the content can be easily extracted. They are just difficult to create from python. |
Function taking symbols as parameters should also accept strings, see |
|
There are currently issues with Python 3.9. |
Here is a test repo for Binder that installs what's needed for Rheos with Python. |
I made an attempt to access RHEOS from Python using PyJulia.
This seems to work well enough, although I had to call Julia with certain options to get it to work. See below.
It would be good to explore further what PyJulia can do. Very promising so far.
The text was updated successfully, but these errors were encountered: