nessai.flowmodel.utils
======================

.. py:module:: nessai.flowmodel.utils

.. autoapi-nested-parse::

   Utilities for configuring FlowModel.

   ..
       !! processed by numpydoc !!


Functions
---------

.. autoapisummary::

   nessai.flowmodel.utils.update_flow_config
   nessai.flowmodel.utils.update_config


Module Contents
---------------

.. py:function:: update_flow_config(cfg)

   
   Update the model (flow) configuration dictionary based on the defaults.


   :Parameters:

       **d** : Union[dict, None]
           Dictionary with the current configuration. If None, then the default is
           used.



   :Returns:

       dict
           Updated configuration dictionary.




   :Raises:

       TypeError
           Raised if the input is not a dictionary or None.







   ..
       !! processed by numpydoc !!

.. py:function:: update_config(flow_config, training_config=None)

   
   Update the configuration dictionary to include the defaults.


   :Parameters:

       **flow_config** : dict
           Dictionary with flow configuration

       **training_config** : dict
           Dictionary with training config



   :Returns:

       dict
           Dictionary with updated flow configuration

       dict
           Dictionary with updated training configuration








   .. rubric:: Notes

   The default configuration is specified in :py:mod:`nessai.flowmodel.config`

   The kwargs can contain any additional keyword arguments that are specific
   to the type of flow being used.



   ..
       !! processed by numpydoc !!

