arraylias.Alias.register_default#

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

Register a default function alias for un-registered types.

This function will be used by aliased functions for unregistered array types where the array library cannot be inferred.

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.