BufferRegistry#
- class fields.buffers.registry.BufferRegistry[source]#
Registry for mapping array-like objects to Pisces buffer backends.
This class maintains an ordered list of buffer types and handles dispatching to the appropriate one when resolving unknown array-like input.
Registries can be instantiated per subsystem, or a default global instance can be used.
Methods
__init__
()Initialize the registry.
clear
()Clear all registered buffer types.
get_buffer_class
(array_like)Identify the appropriate buffer class for a given array-like object.
Return a list of the names of registered buffer classes.
register
(buffer_cls[, prepend])Register a new buffer type.
resolve
(array_like, *args, **kwargs)Resolve and wrap an array-like object using an appropriate buffer class.