Reputation: 145
Let's say I have two arrays
arr1 = np.array([1, 2, 3, 4, 5])
arr2 = np.array([[1, 2, 3], [4, 5, 6]])
I want to create a list which contains each sequence of arr1 and arr2. I do that with
l = [arr1, arr2[0], arr2[1]]
But the length of arr2 can change, how can I create a list with loop for ? Or another way ?
Upvotes: 2
Views: 133