leaspy.samplers.factory ======================= .. py:module:: leaspy.samplers.factory Attributes ---------- .. autoapisummary:: leaspy.samplers.factory.SamplerFactoryInput leaspy.samplers.factory.INDIVIDUAL_SAMPLERS leaspy.samplers.factory.POPULATION_SAMPLERS Functions --------- .. autoapisummary:: leaspy.samplers.factory.sampler_factory Module Contents --------------- .. py:data:: SamplerFactoryInput .. py:data:: INDIVIDUAL_SAMPLERS .. py:data:: POPULATION_SAMPLERS .. py:function:: sampler_factory(sampler, variable_type, **kwargs) Factory for Samplers. :Parameters: **sampler** : :class:`.AbstractSampler` or :obj:`str` If an instance of a subclass of :class:`.AbstractSampler`, returns the instance. If a string, returns a new instance of the appropriate class (with optional parameters `kwargs`). **variable_type** : :class:`.VariableType` The type of random variable that the sampler is supposed to sample. **\*\*kwargs** Optional parameters for initializing the requested Sampler (not used if input is a subclass of :class:`.AbstractSampler`). :Returns: :class:`.AbstractSampler` The desired sampler. :Raises: :exc:`.LeaspyAlgoInputError`: If the sampler provided is not supported. .. !! processed by numpydoc !!