From 01c7a38224e5138fe883c7fb85f4e3d9aafad5cf Mon Sep 17 00:00:00 2001 From: nottaanibot Date: Mon, 13 Apr 2015 12:52:34 -0400 Subject: [PATCH 1/2] Update test_tile.py --- pandas/tools/tests/test_tile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tools/tests/test_tile.py b/pandas/tools/tests/test_tile.py index 4a0218bef6001..ea96052d45fb5 100644 --- a/pandas/tools/tests/test_tile.py +++ b/pandas/tools/tests/test_tile.py @@ -153,7 +153,7 @@ def test_qcut_specify_quantiles(self): self.assertTrue(factor.equals(expected)) def test_qcut_all_bins_same(self): - assertRaisesRegexp(ValueError, "edges.*unique", qcut, [0,0,0,0,0,0,0,0,0,0], 3) + assertRaisesRegexp(ValueError, ""The quantiles you selected do not result in unique bins. Try selecting fewer quantiles."", qcut, [0,0,0,0,0,0,0,0,0,0], 3) def test_cut_out_of_bounds(self): arr = np.random.randn(100) From f3b41420e65f2e4ae88ceda30127213d0b66549d Mon Sep 17 00:00:00 2001 From: nottaanibot Date: Mon, 13 Apr 2015 13:29:01 -0400 Subject: [PATCH 2/2] Update tile.py --- pandas/tools/tile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tools/tile.py b/pandas/tools/tile.py index 6830919d9c09f..a476359efa07f 100644 --- a/pandas/tools/tile.py +++ b/pandas/tools/tile.py @@ -186,7 +186,7 @@ def _bins_to_cuts(x, bins, right=True, labels=None, retbins=False, ids = bins.searchsorted(x, side=side) if len(algos.unique(bins)) < len(bins): - raise ValueError('Bin edges must be unique: %s' % repr(bins)) + raise ValueError('The quantiles you selected do not result in unique bins. Try selecting fewer quantiles.') if include_lowest: ids[x == bins[0]] = 1