class_docstr: Create `Dimension` objects using a name for it and an string expression
  which encodes prior and dimension information.
  
  Basically, one must provide a string like a function call to a method that
  has the name of a distribution, .e.g. ``alpha``, and then provide settings
  about that distributions and information about the `Dimension`, if it
  cannot be inferred. One example for the latter case is:
  
  ``uniform(-3, 5)`` will return a :class:`orion.algo.space.Real` dimension, while
  ``uniform(-3, 5, discrete=True)`` will return an :class:`orion.algo.space.Integer` dimension.
  
  Sometimes there is also a separate name for the same distribution in integers,
  for the 'uniform' example:
  
  ``randint(-3, 5)`` will return a uniform :class:`orion.algo.space.Integer` dimension.
  
  For categorical dimensions, one can use either ``enum`` or ``random`` name.
  ``random`` however can be used for uniform reals or integers as well.
  
  Most names are taken from instances contained in :scipy.stats:`distributions`.
  So, if the distribution you are searching for is there, then `DimensionBuilder`
  can build one dimension with that prior!
  
  Examples
  --------
  >>> dimbuilder = DimensionBuilder()
  >>> dimbuilder.build('learning_rate', 'loguniform(0.001, 1, shape=10)')
  Real(name=learning_rate, prior={reciprocal: (0.001, 1), {}}, shape=(10,))
  >>> dimbuilder.build('something_else', 'poisson(mu=3)')
  Integer(name=something_else, prior={poisson: (), {'mu': 3}}, shape=())
  >>> dim = dimbuilder.build('other2', 'uniform(-5, 2)')
  >>> dim
  Real(name=other2, prior={uniform: (-5, 7), {}}, shape=())
  >>> dim.interval()
  (-5.0, 2.0)
class_docstr_tok: ["Create","`","Dimension","`","objects","using","a","name","for","it","and","an","string","expression","which","encodes","prior","and","dimension","information",".","Basically",",","one","must","provide","a","string","like","a","function","call","to","a","method","that","has","the","name","of","a","distribution",",",".e.g",".","``","alpha","``",",","and","then","provide","settings","about","that","distributions","and","information","about","the","`","Dimension","`",",","if","it","can","not","be","inferred",".","One","example","for","the","latter","case","is",":","``","uniform","(","-3",",","5",")","``","will","return","a",":","class",":","`","orion.algo.space.Real","`","dimension",",","while","``","uniform","(","-3",",","5",",","discrete=True",")","``","will","return","an",":","class",":","`","orion.algo.space.Integer","`","dimension",".","Sometimes","there","is","also","a","separate","name","for","the","same","distribution","in","integers",",","for","the","'uniform","'","example",":","``","randint","(","-3",",","5",")","``","will","return","a","uniform",":","class",":","`","orion.algo.space.Integer","`","dimension",".","For","categorical","dimensions",",","one","can","use","either","``","enum","``","or","``","random","``","name",".","``","random","``","however","can","be","used","for","uniform","reals","or","integers","as","well",".","Most","names","are","taken","from","instances","contained","in",":","scipy.stats",":","`","distributions","`",".","So",",","if","the","distribution","you","are","searching","for","is","there",",","then","`","DimensionBuilder","`","can","build","one","dimension","with","that","prior","!","Examples","--","--","--","--",">",">",">","dimbuilder","=","DimensionBuilder","(",")",">",">",">","dimbuilder.build","(","'learning_rate","'",",","'loguniform","(","0.001",",","1",",","shape=10",")","'",")","Real","(","name=learning_rate",",","prior=","{","reciprocal",":","(","0.001",",","1",")",",","{","}","}",",","shape=","(","10",",",")",")",">",">",">","dimbuilder.build","(","'something_else","'",",","'poisson","(","mu=3",")","'",")","Integer","(","name=something_else",",","prior=","{","poisson",":","(",")",",","{","'mu","'",":","3","}","}",",","shape=","(",")",")",">",">",">","dim","=","dimbuilder.build","(","'other2","'",",","'uniform","(","-5",",","2",")","'",")",">",">",">","dim","Real","(","name=other2",",","prior=","{","uniform",":","(","-5",",","7",")",",","{","}","}",",","shape=","(",")",")",">",">",">","dim.interval","(",")","(","-5.0",",","2.0",")"]
docstr: Return a `Dimension` object with
  :scipy.stats:`distributions.reciprocal` prior distribution.
docstr_tok: ["Return","a","`","Dimension","`","object","with",":","scipy.stats",":","`","distributions.reciprocal","`","prior","distribution","."]
code: def loguniform(self, *args, **kwargs):
      """Return a `Dimension` object with
      :scipy.stats:`distributions.reciprocal` prior distribution.
      """
      name = self.name
      klass = _real_or_int(kwargs)
      return klass(name, "reciprocal", *args, **kwargs)
  
imports: import logging
  import re
  from collections import OrderedDict
  from scipy.stats import distributions
  from orion.algo.space import Categorical, Fidelity, Integer, Real, Space
  from orion.core.utils.flatten import flatten
label_desc: Use image node_id 8 for calling the DimensionBuilder obj's underlying member method code with example usage: obj.loguniform() and returns: klass