Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Hist(bh.Histogram(...), name="something").name errors out #581

Open
Saransh-cpp opened this issue Aug 15, 2024 · 0 comments
Open

[BUG] Hist(bh.Histogram(...), name="something").name errors out #581

Saransh-cpp opened this issue Aug 15, 2024 · 0 comments

Comments

@Saransh-cpp
Copy link
Member

Describe the bug

Passing a bh.Histogram object into hist.Hist with the name keyword argument does not work for name.

Steps to reproduce

In [1]: import hist; import boost_histogram as bh

In [2]: a = hist.axis.Regular(10, 0, 10, name="r")

In [3]: h = bh.Histogram(a)

In [4]: hist.Hist(a, name="hello")
Out[4]: Hist(Regular(10, 0, 10, name='r'), storage=Double())

In [5]: hist.Hist(h, name="hello").name
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[5], line 1
----> 1 hist.Hist(h, name="hello").name

AttributeError: 'Hist' object has no attribute 'name'

In [6]: hist.Hist(a, name="hello").name
Out[6]: 'hello'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant