@@ 2119,6 2119,70 @@ between dataframe libraries.
indices of @code{ndarrays}.")
(license license:expat)))
+(define-public python-nestcheck
+ (package
+ (name "python-nestcheck")
+ ;; 0.2.1 was placed in 2019, there are a lot of changes providing
+ ;; comparability with Python 3.11, use the latest commit from master's
+ ;; HEAD.
+ (properties '((commit . "513ef962ef7b0d66377686f9fe0a9e354dad48b3")
+ (revision . "0")))
+ (version (git-version "0.2.1"
+ (assoc-ref properties 'revision)
+ (assoc-ref properties 'commit)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ejhigson/nestcheck")
+ (commit (assoc-ref properties 'commit))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0zzms2jkiapawnjyr5i7c61m7pmg6yd3nmpv23bdx51glz2fmglc"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; tests: 58 passed, 6 deselected, 10 warnings
+ #:test-flags
+ ;; TypeError: MultiIndex.set_levels() got an unexpected keyword argument
+ ;; 'inplace'
+ #~(list "-k" (string-append "not test_run_list_error_summary"
+ ;; AttributeError: 'Series' object has no
+ ;; attribute 'iteritems'
+ " and not test_kde_plot_df"
+ ;; Test is not determenistic and fails with
+ ;; assertion not equal for DF array.
+ " and not test_summary_df"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-pytest
+ (lambda _
+ (substitute* "tests/test_core.py"
+ (("'nose'") "'pytest'")))))))
+ (native-inputs
+ (list python-pytest
+ python-setuptools))
+ (propagated-inputs
+ (list python-fgivenx
+ python-matplotlib
+ python-numpy
+ python-pandas
+ python-scipy
+ python-tqdm))
+ (home-page "https://github.com/ejhigson/nestcheck")
+ (synopsis "Nested sampling calculations utilities")
+ (description
+ "This package implements a functionality to work with
+@url{https://en.wikipedia.org/wiki/Nested_sampling_algorithm, Nested
+sampling}, a popular numerical method for Bayesian computation, which
+simultaneously generates samples from the posterior distribution and an
+estimate of the Bayesian evidence for a given likelihood and prior.
+@code{nestcheck} provides Python utilities for analysing samples produced by
+nested sampling, and estimating uncertainties on nested sampling
+calculations (which have different statistical properties to calculations
+using other numerical methods).")
+ (license license:expat)))
+
(define-public python-nibabel
(package
(name "python-nibabel")