File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,8 @@ API Changes
206206- Added ``factorize `` functions to ``Index `` and ``Series `` to get indexer and unique values (:issue: `7090 `)
207207- :meth: `DataFrame.describe ` on a DataFrame with a mix of Timestamp and string like objects
208208 returns a different Index (:issue: `7088 `). Previously the index was unintentionally sorted.
209+ - arithmetic operations with **only ** ``bool `` dtypes now raise an error
210+ (:issue: `7011 `, :issue: `6762 `, :issue: `7015 `)
209211
210212Deprecations
211213~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -228,6 +228,18 @@ Display Changes
228228 length of the series (:issue:`7101`)
229229- Fixed a bug in the HTML repr of a truncated Series or DataFrame not showing the class name with the
230230 `large_repr` set to 'info' (:issue:`7105`)
231+ - arithmetic operations with **only** ``bool`` dtypes now raise an error
232+ (:issue:`7011`, :issue:`6762`, :issue:`7015`)
233+
234+ .. code-block:: python
235+
236+ x = pd.Series(np.random.rand(10) > 0.5)
237+ y = True
238+ x * y
239+
240+ # this now raises for arith ops like ``+``, ``*``, etc.
241+ NotImplementedError: operator '*' not implemented for bool dtypes
242+
231243
232244.. _whatsnew_0140.groupby:
233245
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def names(x):
6161 default_axis = default_axis , fill_zeros = np .inf ),
6262 # Causes a floating point exception in the tests when numexpr
6363 # enabled, so for now no speedup
64- mod = arith_method (operator .mod , names ('mod' ), op ( '%' ) ,
64+ mod = arith_method (operator .mod , names ('mod' ), None ,
6565 default_axis = default_axis , fill_zeros = np .nan ),
6666 pow = arith_method (operator .pow , names ('pow' ), op ('**' ),
6767 default_axis = default_axis ),
You can’t perform that action at this time.
0 commit comments