wums 0.1.5__tar.gz → 0.1.7__tar.gz

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.
wums-0.1.7/PKG-INFO ADDED
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.2
2
+ Name: wums
3
+ Version: 0.1.7
4
+ Summary: .
5
+ Author-email: David Walter <david.walter@cern.ch>, Josh Bendavid <josh.bendavid@cern.ch>, Kenneth Long <kenneth.long@cern.ch>, Jan Eysermans <jan.eysermans@cern.ch>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/WMass/wums
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ Requires-Dist: hist
15
+ Requires-Dist: numpy
16
+ Provides-Extra: plotting
17
+ Requires-Dist: matplotlib; extra == "plotting"
18
+ Requires-Dist: mplhep; extra == "plotting"
19
+ Provides-Extra: fitting
20
+ Requires-Dist: tensorflow; extra == "fitting"
21
+ Requires-Dist: jax; extra == "fitting"
22
+ Requires-Dist: scipy; extra == "fitting"
23
+ Provides-Extra: pickling
24
+ Requires-Dist: boost_histogram; extra == "pickling"
25
+ Requires-Dist: h5py; extra == "pickling"
26
+ Requires-Dist: hdf5plugin; extra == "pickling"
27
+ Requires-Dist: lz4; extra == "pickling"
28
+ Provides-Extra: all
29
+ Requires-Dist: plotting; extra == "all"
30
+ Requires-Dist: fitting; extra == "all"
31
+ Requires-Dist: pickling; extra == "all"
32
+
33
+ # WUMS: Wremnants Utilities, Modules, and other Stuff
34
+
35
+ As the name suggests, this is a collection of different thins, all python based:
36
+ - Fitting with tensorflow or jax
37
+ - Custom pickling h5py objects
38
+ - Plotting functionality
39
+
40
+ ## Install
41
+
42
+ The `wums` package can be pip installed with minimal dependencies:
43
+ ```bash
44
+ pip install wums
45
+ ```
46
+ Different dependencies can be added with `plotting`, `fitting`, `pickling` to use the corresponding scripts.
47
+ For example, one can install with
48
+ ```bash
49
+ pip install wums[plotting,fitting]
50
+ ```
51
+ Or all dependencies with
52
+ ```bash
53
+ pip install wums[all]
54
+ ```
wums-0.1.7/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # WUMS: Wremnants Utilities, Modules, and other Stuff
2
+
3
+ As the name suggests, this is a collection of different thins, all python based:
4
+ - Fitting with tensorflow or jax
5
+ - Custom pickling h5py objects
6
+ - Plotting functionality
7
+
8
+ ## Install
9
+
10
+ The `wums` package can be pip installed with minimal dependencies:
11
+ ```bash
12
+ pip install wums
13
+ ```
14
+ Different dependencies can be added with `plotting`, `fitting`, `pickling` to use the corresponding scripts.
15
+ For example, one can install with
16
+ ```bash
17
+ pip install wums[plotting,fitting]
18
+ ```
19
+ Or all dependencies with
20
+ ```bash
21
+ pip install wums[all]
22
+ ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wums"
7
- version = "0.1.5"
7
+ version = "0.1.7"
8
8
  description = "."
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  license = { text = "MIT" }
@@ -12,6 +12,7 @@ authors = [
12
12
  {name = "David Walter", email = "david.walter@cern.ch"},
13
13
  {name = "Josh Bendavid", email = "josh.bendavid@cern.ch"},
14
14
  {name = "Kenneth Long", email = "kenneth.long@cern.ch"},
15
+ {name = "Jan Eysermans", email = "jan.eysermans@cern.ch"},
15
16
  ]
16
17
  urls = {Homepage = "https://github.com/WMass/wums"}
17
18
  classifiers = [
@@ -23,17 +24,16 @@ classifiers = [
23
24
  requires-python = ">=3.8"
24
25
 
25
26
  dependencies = [
26
- "boost_histogram",
27
- "h5py",
28
- "hdf5plugin",
29
27
  "hist",
30
- "lz4",
31
- "matplotlib",
32
- "mplhep",
33
28
  "numpy",
34
- "uproot"
35
29
  ]
36
30
 
31
+ [project.optional-dependencies]
32
+ plotting = ["matplotlib", "mplhep"]
33
+ fitting = ["tensorflow", "jax", "scipy"]
34
+ pickling = ["boost_histogram", "h5py", "hdf5plugin", "lz4"]
35
+ all = ["plotting", "fitting", "pickling"]
36
+
37
37
  [tool.setuptools.packages.find]
38
38
  where = ["."]
39
39
 
@@ -40,7 +40,7 @@ def broadcastSystHist(h1, h2, flow=True, by_ax_name=True):
40
40
  h2.ndim - 1 - i: h2.values(flow=flow).shape[h2.ndim - 1 - i]
41
41
  for i in range(h2.ndim - h1.ndim)
42
42
  }
43
-
43
+
44
44
  broadcast_shape = list(moves.values()) + list(s1)
45
45
 
46
46
  try:
@@ -53,6 +53,10 @@ def broadcastSystHist(h1, h2, flow=True, by_ax_name=True):
53
53
  f" h2.axes: {h2.axes}"
54
54
  )
55
55
 
56
+ if by_ax_name:
57
+ # We also have to move axes that are in common between h1 and h2 but in different order
58
+ moves.update({sum([k<i for k in moves.keys()]) + h1.axes.name.index(n2): None for i, n2 in enumerate(h2.axes.name) if n2 in h1.axes.name})
59
+
56
60
  # move back to original order
57
61
  new_vals = np.moveaxis(new_vals, np.arange(len(moves)), list(moves.keys()))
58
62