On Tue, Aug 16, 2011 at 4:51 PM, Hongchun Jin wrote:
> *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-
On 16 Aug 2011, at 23:51, Hongchun Jin wrote:
> 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.hd
*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-
Hi Hongchun,
On 16 Aug 2011, at 23:19, Hongchun Jin wrote:
> 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 exampl
*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', '