2021年1月26日星期二

Formatting by deleting arrays by indexes Numpy Python

I want to delete all the other arrays within list_ that are not listed in the keep array. So the new list_ function would consist of [402.152008,435.790985,423.204987]

keep = np.arange(5, 8, 1)  list_= np.array([457.334015,424.440002,394.795990,408.903992,398.821014,402.152008,435.790985,423.204987,411.574005,  404.424988,399.519989,377.181000,375.467010,386.944000,383.614990,375.071991,359.511993,328.865997,  320.510010,330.079010,336.187012,352.940002,365.026001,361.562012,362.299011,378.549011,390.414001,  400.869995,394.773010,382.556000])    
https://stackoverflow.com/questions/65912292/formatting-by-deleting-arrays-by-indexes-numpy-python January 27, 2021 at 10:58AM

没有评论:

发表评论