File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,8 @@ API Changes
206
206
- Added ``factorize `` functions to ``Index `` and ``Series `` to get indexer and unique values (:issue: `7090 `)
207
207
- :meth: `DataFrame.describe ` on a DataFrame with a mix of Timestamp and string like objects
208
208
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 `)
209
211
210
212
Deprecations
211
213
~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -228,6 +228,18 @@ Display Changes
228
228
length of the series (:issue:`7101`)
229
229
- Fixed a bug in the HTML repr of a truncated Series or DataFrame not showing the class name with the
230
230
`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
+
231
243
232
244
.. _whatsnew_0140.groupby:
233
245
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def names(x):
61
61
default_axis = default_axis , fill_zeros = np .inf ),
62
62
# Causes a floating point exception in the tests when numexpr
63
63
# enabled, so for now no speedup
64
- mod = arith_method (operator .mod , names ('mod' ), op ( '%' ) ,
64
+ mod = arith_method (operator .mod , names ('mod' ), None ,
65
65
default_axis = default_axis , fill_zeros = np .nan ),
66
66
pow = arith_method (operator .pow , names ('pow' ), op ('**' ),
67
67
default_axis = default_axis ),
You can’t perform that action at this time.
0 commit comments