How can I generate random dates within a range of dates on bimonthly basis in numpy? One way I can think of is generating two sets of random integer arrays:
bimonthly1 = np.random.randint(1,15,12)
bimonthly2 = np.random.randint(16,30,12)
I can then generate the dates, with the 'day' values from the above two arrays for each month. However, this will require me to explicitly pass month and year data. A solution would be to generate the desired date_range first and substitute the 'days' in the range with the above array values. But for a large array, this may not be the best solution. This method will require operation on each and every element of the range.
I would appreciate any pointers on how to do this in numpy more efficiently.