to_np_busdaycalendar
The to_np_busdaycalendar method creates a numpy.busdaycalendar from a Java BusinessCalendar.
Note
Partial holidays in the business calendar are interpreted as full holidays in the numpy business day calendar.
Syntax
to_np_busdaycalendar(
cal: BusinessCalendar,
include_partial: bool = True
) -> numpy.busdaycalendar
Parameters
| Parameter | Type | Description |
|---|---|---|
| cal | BusinessCalendar | The Java |
| include_partial optional | bool | Whether to include partial holidays in the NumPy business day calendar. Default is |
Returns
A numpy.busdaycalendar from the given Java BusinessCalendar.
Examples
The following example creates a Java BusinessCalendar and converts it to a numpy.busdaycalendar.
from deephaven.calendar import calendar
from deephaven.numpy import to_np_busdaycalendar
cal = calendar()
result = to_np_busdaycalendar(cal)
print(type(result))