vegas 6.2__cp311-cp311-macosx_11_0_arm64.whl → 6.2.1__cp311-cp311-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vegas might be problematic. Click here for more details.

vegas/__init__.py CHANGED
@@ -78,7 +78,7 @@ import pickle
78
78
 
79
79
 
80
80
  class PDFEV(_gvar.GVar):
81
- """ Expectation value from |PDFIntegrator|.
81
+ r""" Expectation value from |PDFIntegrator|.
82
82
 
83
83
  Expectation values are returned by
84
84
  :meth:`vegas.PDFIntegrator.__call__` and
@@ -148,7 +148,7 @@ class PDFEV(_gvar.GVar):
148
148
  self.analyzer = analyzer
149
149
 
150
150
  def extend(self, pdfev):
151
- """ Merge results from :class:`PDFEV` object ``pdfev`` after results currently in ``self``. """
151
+ r""" Merge results from :class:`PDFEV` object ``pdfev`` after results currently in ``self``. """
152
152
  self.results.extend(pdfev.results)
153
153
 
154
154
  def __getattr__(self, k):
@@ -175,7 +175,7 @@ class PDFEV(_gvar.GVar):
175
175
  return (PDFEV, (pickle.dumps(self.results), self.analyzer))
176
176
 
177
177
  class PDFEVArray(numpy.ndarray):
178
- """ Array of expectation values from |PDFIntegrator|.
178
+ r""" Array of expectation values from |PDFIntegrator|.
179
179
 
180
180
  Expectation values are returned by
181
181
  :meth:`vegas.PDFIntegrator.__call__` and
@@ -246,7 +246,7 @@ class PDFEVArray(numpy.ndarray):
246
246
  return self
247
247
 
248
248
  def extend(self, pdfev):
249
- """ Merge results from :class:`PDFEVArray` object ``pdfev`` after results currently in ``self``. """
249
+ r""" Merge results from :class:`PDFEVArray` object ``pdfev`` after results currently in ``self``. """
250
250
  self.results.extend(pdfev.results)
251
251
 
252
252
  def __getattr__(self, k):
@@ -271,7 +271,7 @@ class PDFEVArray(numpy.ndarray):
271
271
  return (PDFEVArray, (pickle.dumps(self.results), self.analyzer))
272
272
 
273
273
  class PDFEVDict(_gvar.BufferDict):
274
- """ Dictionary of expectation values from |PDFIntegrator|.
274
+ r""" Dictionary of expectation values from |PDFIntegrator|.
275
275
 
276
276
  Expectation values are returned by
277
277
  :meth:`vegas.PDFIntegrator.__call__` and
@@ -345,7 +345,7 @@ class PDFEVDict(_gvar.BufferDict):
345
345
  self.analyzer = analyzer
346
346
 
347
347
  def extend(self, pdfev):
348
- """ Merge results from :class:`PDFEVDict` object ``pdfev`` after results currently in ``self``. """
348
+ r""" Merge results from :class:`PDFEVDict` object ``pdfev`` after results currently in ``self``. """
349
349
  self.results.extend(pdfev.results)
350
350
 
351
351
  def _remove_gvars(self, gvlist):
@@ -370,7 +370,7 @@ class PDFEVDict(_gvar.BufferDict):
370
370
  return (PDFEVDict, (pickle.dumps(self.results), self.analyzer))
371
371
 
372
372
  class PDFIntegrator(Integrator):
373
- """ :mod:`vegas` integrator for PDF expectation values.
373
+ r""" :mod:`vegas` integrator for PDF expectation values.
374
374
 
375
375
  ``PDFIntegrator(param, pdf)`` creates a |vegas| integrator that
376
376
  evaluates expectation values of arbitrary functions ``f(p)`` with
@@ -533,7 +533,7 @@ class PDFIntegrator(Integrator):
533
533
  self.set(**kargs)
534
534
 
535
535
  def set(self, ka={}, **kargs):
536
- """ Reset default parameters in integrator.
536
+ r""" Reset default parameters in integrator.
537
537
 
538
538
  Usage is analogous to the constructor
539
539
  for :class:`PDFIntegrator`: for example, ::
@@ -573,7 +573,7 @@ class PDFIntegrator(Integrator):
573
573
  return old_defaults
574
574
 
575
575
  def _make_map(self, limit):
576
- """ Make vegas grid that is adapted to the pdf. """
576
+ r""" Make vegas grid that is adapted to the pdf. """
577
577
  ny = 2000
578
578
  y = _gvar.RNG.random((ny,1))
579
579
  limit = numpy.arctan(limit)
@@ -591,7 +591,7 @@ class PDFIntegrator(Integrator):
591
591
 
592
592
  @staticmethod
593
593
  def _f_lbatch(theta, f, param_pdf, pdf, scale, adapt_to_pdf):
594
- """ Integrand for PDFIntegrator.
594
+ r""" Integrand for PDFIntegrator.
595
595
 
596
596
  N.B. Static method is more efficient because less to carry around
597
597
  (eg, when nproc>1).
@@ -629,7 +629,7 @@ class PDFIntegrator(Integrator):
629
629
  return ans
630
630
 
631
631
  def __call__(self, f=None, save=None, saveall=None, **kargs):
632
- """ Estimate expectation value of function ``f(p)``.
632
+ r""" Estimate expectation value of function ``f(p)``.
633
633
 
634
634
  Uses module :mod:`vegas` to estimate the integral of
635
635
  ``f(p)`` multiplied by the probability density function
@@ -726,7 +726,7 @@ class PDFIntegrator(Integrator):
726
726
  return ans
727
727
 
728
728
  def stats(self, f=None, moments=False, histograms=False, **kargs):
729
- """ Statistical analysis of function ``f(p)``.
729
+ r""" Statistical analysis of function ``f(p)``.
730
730
 
731
731
  Uses the :mod:`vegas` integrator to evaluate the expectation
732
732
  values and (co)variances of ``f(p)`` with
@@ -944,7 +944,7 @@ class PDFIntegrator(Integrator):
944
944
 
945
945
  @staticmethod
946
946
  def _stats_analyzer(results, fpsample, moments, histograms):
947
- """ Create final stats results from Integrator results """
947
+ r""" Create final stats results from Integrator results """
948
948
  # convert from Integrator to PDFIntegrator results
949
949
  tmp = _gvar.BufferDict()
950
950
  for k in results:
@@ -1046,7 +1046,7 @@ class PDFIntegrator(Integrator):
1046
1046
  return p
1047
1047
 
1048
1048
  def sample(self, nbatch, mode='rbatch'):
1049
- """ Generate random samples from the integrator's PDF.
1049
+ r""" Generate random samples from the integrator's PDF.
1050
1050
 
1051
1051
  Typical usage is::
1052
1052
 
@@ -1187,7 +1187,7 @@ class PDFIntegrator(Integrator):
1187
1187
  return wgts, samples
1188
1188
 
1189
1189
  class PDFAnalyzer(object):
1190
- """ |vegas| analyzer for implementing ``save``, ``saveall`` keywords for :class:`PDFIntegrator` """
1190
+ r""" |vegas| analyzer for implementing ``save``, ``saveall`` keywords for :class:`PDFIntegrator` """
1191
1191
  def __init__(self, pdfinteg, analyzer, save=None, saveall=None):
1192
1192
  self.pdfinteg = pdfinteg
1193
1193
  self.analyzer = analyzer
@@ -1217,7 +1217,7 @@ class PDFAnalyzer(object):
1217
1217
 
1218
1218
 
1219
1219
  def ravg(reslist, weighted=None, rescale=None):
1220
- """ Create running average from list of :mod:`vegas` results.
1220
+ r""" Create running average from list of :mod:`vegas` results.
1221
1221
 
1222
1222
  This function is used to change how the weighted average of
1223
1223
  |vegas| results is calculated. For example, the following code