File: index.rst

package info (click to toggle)
python-boost-histogram 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,236 kB
  • sloc: python: 7,940; cpp: 3,243; makefile: 22; sh: 1
file content (132 lines) | stat: -rw-r--r-- 4,435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.. boost-histogram documentation master file, created by
   sphinx-quickstart on Tue Apr 23 12:12:27 2019.
   You can adapt this file completely to your liking, but it should at least
   contain the root ``toctree`` directive.

.. image:: _images/BoostHistogramPythonLogo.png
  :width: 70%
  :alt: Boost histogram logo
  :align: center

Welcome to boost-histogram's documentation!
===========================================

|Actions Status| |Documentation Status| |PyPI version| |Conda-Forge|
|PyPI platforms| |DOI| |GitHub Discussion| |Gitter| |Scikit-HEP|

Boost-histogram (`source <https://github.com/scikit-hep/boost-histogram>`__) is
a Python package providing Python bindings for Boost.Histogram_ (`source
<https://github.com/boostorg/histogram>`__).  You can install this library from
`PyPI <https://pypi.org/project/boost-histogram/>`__ with pip or you can use
Conda via `conda-forge <https://github.com/conda-forge/boost-histogram-feedstock>`__:

.. code-block:: bash

   python -m pip install boost-histogram

.. code-block:: bash

   conda install -c conda-forge boost-histogram

All the normal best-practices for Python apply; you should be in a
virtual environment, etc. See :ref:`usage-installation` for more details. An example of usage:

.. code-block:: python3

   import boost_histogram as bh

   # Compose axis however you like; this is a 2D histogram
   hist = bh.Histogram(bh.axis.Regular(2, 0, 1), bh.axis.Regular(4, 0.0, 1.0))

   # Filling can be done with arrays, one per dimension
   hist.fill([0.3, 0.5, 0.2], [0.1, 0.4, 0.9])

   # NumPy array view into histogram counts, no overflow bins
   counts = hist.view()

See :ref:`usage-quickstart` for more.


.. toctree::
   :maxdepth: 1
   :caption: User Guide:

   user-guide/installation
   user-guide/quickstart
   user-guide/histogram
   user-guide/axes
   user-guide/storage
   user-guide/accumulators
   user-guide/transforms
   user-guide/indexing
   user-guide/plotting
   user-guide/analyses
   user-guide/numpy
   user-guide/subclassing
   user-guide/comparison


.. toctree::
  :maxdepth: 1
  :caption: Examples:

  notebooks/SimpleExample
  notebooks/aghast
  notebooks/ThreadedFills
  notebooks/PerformanceComparison
  notebooks/xarray
  notebooks/BoostHistogramHandsOn

.. toctree::
   :maxdepth: 2
   :titlesonly:
   :caption: Developers
   :glob:

   contributing
   support
   changelog

.. toctree::
  :caption: API Reference:

  api/modules

Acknowledgements
----------------

This library was primarily developed by Henry Schreiner and Hans
Dembinski.

Support for this work was provided by the National Science Foundation
cooperative agreement OAC-1836650 (IRIS-HEP) and OAC-1450377
(DIANA/HEP). Any opinions, findings, conclusions or recommendations
expressed in this material are those of the authors and do not
necessarily reflect the views of the National Science Foundation.

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. _Boost.Histogram: https://www.boost.org/doc/libs/release/libs/histogram/doc/html/index.html
.. |Actions Status| image:: https://github.com/scikit-hep/boost-histogram/workflows/Tests/badge.svg
   :target: https://github.com/scikit-hep/boost-histogram/actions
.. |Documentation Status| image:: https://readthedocs.org/projects/boost-histogram/badge/?version=latest
   :target: https://boost-histogram.readthedocs.io/en/latest/?badge=latest
.. |PyPI version| image:: https://badge.fury.io/py/boost-histogram.svg
   :target: https://pypi.org/project/boost-histogram
.. |Conda-Forge| image:: https://img.shields.io/conda/vn/conda-forge/boost-histogram
   :target: https://github.com/conda-forge/boost-histogram-feedstock
.. |PyPI platforms| image:: https://img.shields.io/pypi/pyversions/boost-histogram
   :target: https://pypi.org/project/boost-histogram/
.. |DOI| image:: https://zenodo.org/badge/148885351.svg
   :target: https://zenodo.org/badge/latestdoi/148885351
.. |GitHub Discussion| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
   :target: https://github.com/scikit-hep/boost-histogram/discussions
.. |Gitter| image:: https://badges.gitter.im/HSF/PyHEP-histogramming.svg
   :target: https://gitter.im/HSF/PyHEP-histogramming?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
.. |Scikit-HEP| image:: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
   :target: https://scikit-hep.org/