Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release notes
=============

Version 1.1.1, Aug 2024
-----------------------
* Compatibility with numpy v2.3: converting np.number to a dtype no longer allowed.

Version 1.1.0, Dec 2024
-----------------------
* Removed all ROOT, cpp and cuda code, it was no longer supported.
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ more quickly via Numpy commands, rather than Python for loops.

This Python implementation of histogrammar been tested to guarantee compatibility with its Scala implementation.

Latest Python release: v1.1.0 (Feb 2025).
Latest update: Feb 2025.
Latest Python release: v1.1.1 (Aug 2025).
Latest update: Aug 2025.

References
==========
Expand Down
8 changes: 4 additions & 4 deletions histogrammar/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ def get_datatype(hist, itr=0):
return []
if isinstance(hist, histogrammar.Bag):
if hist.dimension > 0:
return [np.number] * hist.dimension
return [str] if hist.range == "S" else [np.number]
return [float] * hist.dimension
return [str] if hist.range == "S" else [float]
if isinstance(
hist,
(
Expand All @@ -550,7 +550,7 @@ def get_datatype(hist, itr=0):
return []
# else: no parent histogram.
# input datatype must be a number. Let's also make an educated guess if it's a converted timestamp
datatype = [np.number]
datatype = [float]
if isinstance(hist, histogrammar.Maximize):
value = hist.max
elif isinstance(hist, histogrammar.Minimize):
Expand Down Expand Up @@ -582,7 +582,7 @@ def get_datatype(hist, itr=0):
else:
# input datatype must be a number.
# let's make an educated guess if it's a converted timestamp
datatype = [np.number]
datatype = [float]
if isinstance(hist, (histogrammar.Bin, histogrammar.SparselyBin)):
values = [hist.low, hist.high]
elif isinstance(hist, histogrammar.CentrallyBin):
Expand Down
2 changes: 1 addition & 1 deletion histogrammar/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import re

version = "1.1.0"
version = "1.1.1"


def split_version_string(version_string: str) -> tuple[int, int]:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pandas = [
"pandas"
]
spark = [
"pyspark>=3.1; python_version <= '3.11'",
"pyspark<4; python_version <= '3.11'",
]
test = [
"ipykernel>=5.1.3",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ def test_datatype(self):
df, hist1, hist2, hist3 = get_test_histograms1()

assert hist1.datatype == str
np.testing.assert_array_equal(hist2.datatype, [np.number, str])
np.testing.assert_array_equal(hist3.datatype, [np.datetime64, np.number, str])
np.testing.assert_array_equal(hist2.datatype, [float, str])
np.testing.assert_array_equal(hist3.datatype, [np.datetime64, float, str])

def test_n_bins(self):
"""Test getting the number of allocated bins"""
Expand Down