parameters: (dtype, f)
docstring: Recursively produce a fill value for `dtype`, calling f on scalar dtypes
docstring_summary: Recursively produce a fill value for `dtype`, calling f on scalar dtypes
docstring_tokens: Recursively produce a fill value for dtype calling f on scalar dtypes
function: def _recursive_fill_value(dtype, f):
      """
      Recursively produce a fill value for `dtype`, calling f on scalar dtypes
      """
      if dtype.names is not None:
          vals = tuple(_recursive_fill_value(dtype[name], f) for name in dtype.names)
          return np.array(vals, dtype=dtype)[()]  # decay to void scalar from 0d
      elif dtype.subdtype:
          subtype, shape = dtype.subdtype
          subval = _recursive_fill_value(subtype, f)
          return np.full(shape, subval)
      else:
          return f(dtype)
function_tokens: def _recursive_fill_value ( dtype , f ) : if dtype . names is not None : vals = tuple ( _recursive_fill_value ( dtype [ name ] , f ) for name in dtype . names ) return np . array ( vals , dtype = dtype ) [ ( ) ] # decay to void scalar from 0d elif dtype . subdtype : subtype , shape = dtype . subdtype subval = _recursive_fill_value ( subtype , f ) return np . full ( shape , subval ) else : return f ( dtype )