Re: [Numpy-discussion] Trim a numpy array in numpy.

2011-08-16 Thread Hongchun Jin
*Thanks Derek for the quick reply. But **I am sorry, I did not make it clear in my last email. Assume I have an array like * * ['CAL_LID_L2_05kmCLay-Prov-V3-01.2008-01-01T00-37-48ZD.hdf' 'CAL_LID_L2_05kmCLay-Prov-V3-01.2008-01-01T00-37-48ZD.hdf' 'CAL_LID_L2_05kmCLay-Prov-V3-01.2008-01-01T00-

[Numpy-discussion] Trim a numpy array in numpy.

2011-08-16 Thread Hongchun Jin
*Hi there, * * * *I have a question regarding how to trim a string array in numpy. * * * *>>> import numpy as np* *>>> x = np.array(['aaa.hdf', 'bbb.hdf', 'ccc.hdf', 'ddd.hdf'])* * * *I expect to trim a certain part of each element in the array, for example '.hdf', giving me ['aaa', 'bbb', 'ccc', '