abracudabra.device.library ========================== .. py:module:: abracudabra.device.library .. autoapi-nested-parse:: Library import functions for device types. Attributes ---------- .. autoapisummary:: abracudabra.device.library._DEVICE_TO_LIBRARY abracudabra.device.library._DEFAULT_DEVICE_TYPE Functions --------- .. autoapisummary:: abracudabra.device.library._import_library abracudabra.device.library.get_np_or_cp abracudabra.device.library.get_pd_or_cudf Module Contents --------------- .. py:data:: _DEVICE_TO_LIBRARY :type: dict[str, dict[abracudabra.device.base.DeviceType, str]] A collection of mappings from device types to library names. .. py:data:: _DEFAULT_DEVICE_TYPE :type: abracudabra.device.base.DeviceType :value: 'cpu' The default device type, if the device type is not specified. .. py:function:: _import_library(obj_name: str, device_type: abracudabra.device.base.DeviceType | None = None) -> types.ModuleType .. py:function:: get_np_or_cp(device_type: abracudabra.device.base.DeviceType | None = None) -> types.ModuleType Get the numpy or cupy library based on the device type. .. py:function:: get_pd_or_cudf(device_type: abracudabra.device.base.DeviceType | None = None) -> types.ModuleType Get the pandas or cudf library based on the device type.