Message Boards Message Boards

Send lots of data from WL to a Python variable?

Posted 3 years ago

I know how to create a variable and assign it a value in Python using a bunch of strings:

ExternalEvaluate[session, "x=[1, 2, 3]"]

but suppose I want to send a very large bit of data, and I don't want to worry about whether I have converted it accurately to strings (with e.g. ExportString[., "PythonExpression"]), or am afraid that sending a bunch of strings that must then be interpreted into matrices will be slow. Then how can I do that?

Shouldn't there be some sort of inverse of ExternalValue that could accept or use NumericArray?

B

POSTED BY: Bernard Gress
Posted 3 years ago

Check out this post or this post.

POSTED BY: Mike Besso
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract