def _compute(self, arrays, dates, assets, mask): # Coerce from [ns] to [D] for numpy busday_count. announce_dates = arrays[0].astype(datetime64D_dtype) # Set masked values to NaT. announce_dates[~mask] = NaTD # Convert row labels into a column vector for broadcasted comparison. reference_dates = dates.values.astype(datetime64D_dtype)[:, newaxis] return busday_count_mask_NaT(reference_dates, announce_dates)
def _compute(self, arrays, dates, assets, mask): # Coerce from [ns] to [D] for numpy busday_count. announce_dates = arrays[0].astype(datetime64D_dtype) # Set masked values to NaT. announce_dates[~mask] = NaTD # Convert row labels into a column vector for broadcasted comparison. reference_dates = dates.values.astype(datetime64D_dtype)[:, newaxis] return busday_count_mask_NaT(reference_dates, announce_dates)