class_docstr: Domain class describing a rectangular domain
  
  Attributes:
      size (Tuple[int]): The size of the domain in absolute units.
      dx (Tuple(float)): The unit of measure
class_docstr_tok: ["Domain","class","describing","a","rectangular","domain","Attributes",":","size","(","Tuple","[","int","]",")",":","The","size","of","the","domain","in","absolute","units",".","dx","(","Tuple","(","float",")",")",":","The","unit","of","measure"]
docstr: Returns a function that samples a point in the domain
  
  Returns:
      Callable: A function that samples a point in the domain.
          This function takes a seed and an integer number of samples and returns
          a list of samples.
  
  !!! example
      ```python
      >>> domain = Domain((10, 10), (0.1, 0.1))
      >>> domain_sampler = domain.domain_sampler
      >>> domain_sampler(random.PRNGKey(0), 10)
      Array([[ 0.06298566,  0.35970068],
             [-0.20049798,  0.05455852],
             [ 0.33402848, -0.04824698],
             [ 0.27945423,  0.2805649 ],
             [ 0.49464726,  0.3473643 ],
             [-0.16299951, -0.27665186],
             [-0.06442916,  0.04995835],
             [ 0.05011427, -0.17267668],
             [-0.39805043, -0.05386746],
             [ 0.46900105,  0.21520817]], dtype=float32)
  
      ```
docstr_tok: ["Returns","a","function","that","samples","a","point","in","the","domain","Returns",":","Callable",":","A","function","that","samples","a","point","in","the","domain",".","This","function","takes","a","seed","and","an","integer","number","of","samples","and","returns","a","list","of","samples",".","!","!","!","example","``","`","python",">",">",">","domain","=","Domain","(","(","10",",","10",")",",","(","0.1",",","0.1",")",")",">",">",">","domain_sampler","=","domain.domain_sampler",">",">",">","domain_sampler","(","random.PRNGKey","(","0",")",",","10",")","Array","(","[","[","0.06298566",",","0.35970068","]",",","[","-0.20049798",",","0.05455852","]",",","[","0.33402848",",","-0.04824698","]",",","[","0.27945423",",","0.2805649","]",",","[","0.49464726",",","0.3473643","]",",","[","-0.16299951",",","-0.27665186","]",",","[","-0.06442916",",","0.04995835","]",",","[","0.05011427",",","-0.17267668","]",",","[","-0.39805043",",","-0.05386746","]",",","[","0.46900105",",","0.21520817","]","]",",","dtype=float32",")","``","`"]
code: def domain_sampler(self):
      r"""Returns a function that samples a point in the domain
  
      Returns:
          Callable: A function that samples a point in the domain.
              This function takes a seed and an integer number of samples and returns
              a list of samples.
  
      !!! example
          ```python
          >>> domain = Domain((10, 10), (0.1, 0.1))
          >>> domain_sampler = domain.domain_sampler
          >>> domain_sampler(random.PRNGKey(0), 10)
          Array([[ 0.06298566,  0.35970068],
                 [-0.20049798,  0.05455852],
                 [ 0.33402848, -0.04824698],
                 [ 0.27945423,  0.2805649 ],
                 [ 0.49464726,  0.3473643 ],
                 [-0.16299951, -0.27665186],
                 [-0.06442916,  0.04995835],
                 [ 0.05011427, -0.17267668],
                 [-0.39805043, -0.05386746],
                 [ 0.46900105,  0.21520817]], dtype=float32)
  
          ```
  
      """
      L = jnp.asarray(self.size) / 2
  
      def sample(seed):
          sample = 2 * random.uniform(seed, shape=(self.ndim,)) - 1
          return sample * L
  
      def multi_samples(seed, num_samples: int):
          seeds = random.split(seed, num_samples)
          return jax.vmap(sample)(seeds)
  
      return multi_samples
  
file_path: jaxdf/jaxdf/geometry.py
imports: from functools import reduce
  from typing import Iterable
  import equinox
  import jax
  from jax import numpy
  from jax import random
  from .mods import Module
label_desc: Use image node_id 6 for calling the Domain obj's underlying member method code with example usage: obj.domain_sampler() and returns: multi_samples, unknown, jax