arraylias.Alias.register_fallback#

Alias.register_fallback(func: Callable | None = None, path: str | None = None) Callable | None[source]#

Register a fallback array function for aliasing.

This function will be used if no matches for this name are found in a registered array libraries modules and functions.

Parameters:
  • func – The function to dispatch to for the specified array library. If None this will return a decorator to apply to a function.

  • path – Optional, the path for dispatching to this function. If None the name of the input function will be used.

Returns:

If func is None returns a decorator for registering a function. Otherwise returns None.