i have a numpy array like the following
[[ 1 2 3 4 ]
[ 5 6 7 8 ]
......... ]
So basically I want to create 4 (can be different) lists where
list_1 = [1,5...], list_2 = [2,6....] and so on.
What is the pythonic way to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Given a numpy array
You first have to transpose it
and then convert to list
now you can index
larrayaslarray[0], larray[1]to get the individual lists.