Skip to content

[BUG/FEAT] hist division should convert to floats #601

Open
@andrzejnovak

Description

@andrzejnovak
a = hist.Hist.new.Reg(10,-2,2).Int64().fill(np.random.uniform(-2,2,size=1000))
b = hist.Hist.new.Reg(10,-2,2).Int64().fill(np.random.normal(0,1,size=1000))

print(a.values()/b.values())
print((a/b).values())
>>> [2.51351351 1.46153846 0.92380952 0.82857143 0.59119497 0.70666667
 0.85714286 0.89534884 1.625      3.8125    ]
>>> [2 1 0 0 0 0 0 0 1 3]

@henryiii

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions