I have some input data, with timestamps in the input file in the form of hours from the date time specified in the filename.
This is a bit useless, so I need to conv
Note that @nneonneo solution can be simplified in
result = first_date + np.arange(24) * datetime.timedelta(hours=1)
thanks to NumPy array manipulations. The result array has then a dtype=object.
For more complex ranges, you might be interested in the scikits.timeseries package (no longer maintained) or better, the
pandas package that reimplemented most of the ideas of scikits.timeseries. Both packages support older versions of NumPy (1.5, 1.6...)