Skip to content

Add support for functions with multiple arguments #4

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

qiangyicheng
Copy link

@qiangyicheng qiangyicheng commented May 22, 2024

Previously some binary operators and functions with more variables lead to problems. For example,

Import["https://raw.githubusercontent.com/zwicker-group/MathematicaToPython/master/ToPython.wl"]
ToPython[a . b + c]

invokes error
image
and output

"c + np.dot(<>Private`PythonForm$51284[a, b]<>)"

due to that PythonForm only supports one argument. This can be solved by simply call the function PythonForm recursively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant