Skip to content

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