diff --git a/pygmt/src/grdhisteq.py b/pygmt/src/grdhisteq.py index 0365f5238dc..352c83cfe9a 100644 --- a/pygmt/src/grdhisteq.py +++ b/pygmt/src/grdhisteq.py @@ -243,7 +243,7 @@ def compute_bins( dtype={ "start": np.float32, "stop": np.float32, - "bin_id": np.uint32, + "bin_id": np.int64, }, index_col="bin_id" if output_type == "pandas" else None, ) diff --git a/pygmt/tests/test_grdhisteq.py b/pygmt/tests/test_grdhisteq.py index 76892905269..56e74253f4f 100644 --- a/pygmt/tests/test_grdhisteq.py +++ b/pygmt/tests/test_grdhisteq.py @@ -53,7 +53,7 @@ def fixture_expected_df(): return pd.DataFrame( data=np.array([[345.5, 519.5, 0], [519.5, 726.5, 1]]), columns=["start", "stop", "bin_id"], - ).astype({"start": np.float32, "stop": np.float32, "bin_id": np.uint32}) + ).astype({"start": np.float32, "stop": np.float32, "bin_id": np.int64}) def test_equalize_grid_outgrid_file(grid, expected_grid, region):