I want to sort a list with four numpy arrays.
import numpy as np
import datetime
time_origin=[]
filelist=['3.csv','2.csv','1.csv','4.csv']
for i in np.arange(4):
time_origin.append(np.loadtxt(
filelist[i],delimiter=',',skiprows=1,usecols=(0,),unpack=True))
time_origin.sort()
However, it doesn't work.
The expected result:
for example:
a=[array[1,2,3,4],array[6,2],array[0,12,1,4,5]]
I want to sort a based on the length of each array
the expected result is:
a=[array[6,2],array[1,2,3,4],array[0,12,1,4,5]]