I have a numpy.ndarray of strings like that
HHMM = ['0000' '0001' '0002' '0003' '0004' '0005' '0006' '0007' '0008' '0009' ...]
Here the first two elements are the hour and the last two the minute. In order to convert to time format (using datetime), I want to separate this characters.
I tried doing
hour = HHMM[::][0:2]
minute = HHMM[::][2:4]
but the result is this
print hour
['0000' '0001']
print minute
['0002' '0003']
datetime64values or just arrays of strings?HHMM.view('S2,S2')might split it into a 2 field structured array.