nujo/autodiff/function.py
def _get_function_identifier(func_type: type, inputs: Iterable[Any]) -> str:
    ''' Returns a string identifier for the current function type and its inputs,
    used for a key in the cache.

    '''

    key = str(hash(func_type))  # Inlcude the function type hash in the key
    # Include the inputs' (children's) identifiers in the key
    key += ''.join(('T' + str(x.id) if isinstance(x, Tensor) else 'P' + str(x)
                    for x in inputs))

    # 'T' and 'P' signatures were added in order to avoid
    # collisions between Tensor and Python values

    return key
 Returns a string identifier for the current function type and its inputs,
    used for a key in the cache.

    
Returns a string identifier for the current function type and its inputs,
used for a key in the cache.
Returns a string identifier for the current function type and its inputs used for a key in the cache .
def _get_function_identifier(func_type: type, inputs: Iterable[Any]) -> str:
    key = str(hash(func_type))  
    key += ''.join(('T' + str(x.id) if isinstance(x, Tensor) else 'P' + str(x)
                    for x in inputs))
    return key
def _get_function_identifier ( func_type : type , inputs : Iterable [ Any ] ) -> str : key = str ( hash ( func_type ) ) key += '' . join ( ( 'T' + str ( x . id ) if isinstance ( x , Tensor ) else 'P' + str ( x ) for x in inputs ) ) return key
Returns a string identifier for the current function type and its inputs,
used for a key in the cache.
Returns a string identifier for the current function type and its inputs used for a key in the cache .
''' Returns a string identifier for the current function type and its inputs,
    used for a key in the cache.

    ''' # Inlcude the function type hash in the key # Include the inputs' (children's) identifiers in the key # 'T' and 'P' signatures were added in order to avoid # collisions between Tensor and Python values
func_type
type
inputs
Iterable[Any]