scikit-hep / aghast

Aghast: aggregated, histogram-like statistics, sharable as Flatbuffers.
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Solve keyerror in #29 #31

Closed LovelyBuggies closed 4 years ago

LovelyBuggies commented 4 years ago

Commit 1391c324886a169f990e5d347ea8ba0dcfb1f236:

By this way, the following code could work:

import aghast 
import boost_histogram as bh
import numpy as np

h = bh.Histogram(bh.axis.Regular(20, -5, 5))
h.fill(np.random.normal(0, 1, int(10e3)))
w, data = h.to_numpy()
numpy_hist = (w, data)
ghastly_hist = aghast.from_numpy(numpy_hist)
root_hist = aghast.to_root(ghastly_hist, "bh_root_hist")
LovelyBuggies commented 4 years ago

closes #29 if merged.

LovelyBuggies commented 4 years ago

Commit https://github.com/scikit-hep/aghast/pull/31/commits/33f5fd754c9132ab22a2243876cd3f8c109752c1:

@jpivarski , although you tell me that this is not necessary, I think this would be helpful for someone new to test some conda modules. And you can remove the unnecessary dependencies in "environment.yml" and "requirements.txt".

jpivarski commented 4 years ago

Please make the name changes above and then tell me when you're done with the PR. I need to have positive confirmation before I merge it to be sure you're not still working on a local copy. Thanks!

LovelyBuggies commented 4 years ago

@jpivarski I have corrected file names, adding "-test".

Changes in the commits above:

LovelyBuggies commented 4 years ago

@jpivarski LGTM, do U think it can be merged?

jpivarski commented 4 years ago

There's one unresolved conversation: use the command "python", rather than "python3", in the README. Not all systems have a "python3" command. You can say that "Python 2 is not supported right now" and that would be enough of a hint.

If you're otherwise done, I'll merge it as soon as that conversation is resolved.

LovelyBuggies commented 4 years ago

@jpivarski Any other problems? python3 has been python.

jpivarski commented 4 years ago

It's great, thanks!