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

how to convert list of lists into matrix #99

Closed
ghost opened this issue Jan 20, 2022 · 1 comment
Closed

how to convert list of lists into matrix #99

ghost opened this issue Jan 20, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 20, 2022

With PyCall I can just do a Matrix(data) , but with PythonCall there doesn't seem to be a method available for converting a python list of lists into a matrix.

@cjdoris
Copy link
Collaborator

cjdoris commented Jan 20, 2022

Good question!

One way would be something like pyconvert(Matrix, numpy.array(data)).

Or pyconvert(Vector{<:Vector}, data) gets you a vector of vectors that you can hcat together.

@ghost ghost closed this as completed Jan 22, 2022
This issue was closed.
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

1 participant