Skip to content
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

Writing Julia Objects to pickle and load from python #5

Open
chengchingwen opened this issue Apr 8, 2020 · 3 comments
Open

Writing Julia Objects to pickle and load from python #5

chengchingwen opened this issue Apr 8, 2020 · 3 comments

Comments

@chengchingwen
Copy link
Owner

To make Julia Object loadable from python, there are three issues:

  1. For simple Julia struct (no functions): utilities the stack machine to build a similar python class and load data into it. Will need a rule-base translation for the struct definition to python class definition string.

  2. For Julia Arrays: use the array element type to determine whether to write as python list or numpy array.

  3. For complex Julia Object (like Function and struct with functions): currently there is no simple solution, so these will be unsupported.

@findmyway
Copy link
Contributor

For Julia Arrays: use the array element type to determine whether to write as python list or numpy array.

Could it be more specific here? I guess you mean Array{<:Any} -> list, Array{<:Number} -> numpy array?

@chengchingwen
Copy link
Owner Author

Yes, I think we can use some rule to determine whether the Array is compatible with numpy array, and if not, fallback to python list.

@chengchingwen
Copy link
Owner Author

numpy array also have python object dtype, we probably can use it for Array{Any, N}, but I haven't try it.

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

No branches or pull requests

2 participants