We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98c1fe0 commit 335aff2Copy full SHA for 335aff2
pandas/_libs/tslibs/offsets.pyx
@@ -4424,7 +4424,7 @@ cdef class CustomBusinessDay(BusinessDay):
4424
):
4425
BusinessDay.__init__(self, n, normalize, offset)
4426
if (calendar is not None) and not isinstance(calendar, np.busdaycalendar):
4427
- warnings.warn("Warning: `calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
+ raise TypeError("`calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
4428
self._init_custom(weekmask, holidays, calendar)
4429
4430
cpdef __setstate__(self, state):
0 commit comments