deephaven.numpy¶
This module supports the conversion between Deephaven tables and numpy arrays.
- to_np_busdaycalendar(cal, include_partial=True)[source]¶
Creates a numpy business day calendar from a Java BusinessCalendar.
Partial holidays in the business calendar are interepreted as full holidays in the numpy business day calendar.
- Parameters:
cal (BusinessCalendar) – the Java BusinessCalendar
include_partial (bool) – whether to include partial holidays in the numpy business day calendar, default is True
- Return type:
busdaycalendar
- Returns:
a numpy busdaycalendar
- Raises:
DHError –
- to_numpy(table, cols=None)[source]¶
Produces a numpy array from a table.
Note that the entire table is going to be cloned into memory, so the total number of entries in the table should be considered before blindly doing this. For large tables, consider using the Deephaven query language to select a subset of the table before using this method.