The dates in Y units is:
In [870]: a.astype('datetime64[Y]')
Out[870]: array(['2017', '2017', '2017', '2017', '2017', '2017', '2017', '2017'], dtype='datetime64[Y]')
Or subtracting the first date from the rest, gives a timedelta64
In [875]: a-a[0]
Out[875]: array([0, 1, 2, 3, 4, 5, 6, 7], dtype='timedelta64[D]')
tolist converts the array of dates to a list of datetime objects
In [888]: a.tolist()
Out[888]:
[datetime.date(2017, 1, 1),
datetime.date(2017, 1, 2),
datetime.date(2017, 1, 3),
datetime.date(2017, 1, 4),
datetime.date(2017, 1, 5),
datetime.date(2017, 1, 6),
datetime.date(2017, 1, 7),
datetime.date(2017, 1, 8)]
Which can be formated as strings
In [889]: [x.strftime('%m-%d') for x in a.tolist()]
Out[889]: ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07', '01-08']
There's no datetime64 format that consists of just month and date.
tolist or item on a timedelta64[...]' produces adatetime.timedelta` object.
linspace. No mention of that function here. The link is about a range of dates, but that's all. stackoverflow.com/q/37964100