[Numpy-discussion] record data previous to Numpy use

Derek Homeier derek at astro.physik.uni-goettingen.de
Fri Jul 7 10:55:35 EDT 2017


On 07 Jul 2017, at 4:24 PM, paul.carrico at free.fr wrote:
> 
> ps : I'd like to use the following code that is much more familiar for me :-)
> 
> COMP_list = np.asarray(COMP_list, dtype = np.float64) 
> i = np.arange(1,NumberOfRecords,2)
> COMP_list = np.delete(COMP_list,i)
> 
Not sure about the background of this, but if you want to remove every second entry
(if NumberOfRecords is the full length of the list, that is), it would always be preferable
to make changes to the list, or even better, extract only the entries you want:

COMP_list = np.asarray(COMP_list[::2], dtype = np.float64)

Have a good weekend

					Derek



More information about the NumPy-Discussion mailing list