Skip to content

Commit ea75c3c

Browse files
committed
ipython block
1 parent 6fc61bd commit ea75c3c

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

doc/source/whatsnew/v0.23.0.txt

+12-15
Original file line numberDiff line numberDiff line change
@@ -181,21 +181,7 @@ Please note that the string `index` is not supported with the round trip format,
181181
Index Division By Zero Fills Correctly
182182
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183183

184-
Division operations on ``Index`` and subclasses will now fill positive / 0 with ``np.inf``, negative / 0 with ``-np.inf``, and 0 / 0 with ``np.nan``. This matches existing Series behavior.
185-
186-
Current Behavior:
187-
188-
.. code-block:: ipython
189-
190-
In [3]: index = pd.Index([-1, 0, 1])
191-
In [4]: index / 0
192-
Out[4]: Int64Index([0, 0, 0], dtype='int64')
193-
In [5]: index / 0.0
194-
Out[5]: Float64Index([-inf, nan, inf], dtype='float64')
195-
196-
In [6]: index = pd.UInt64Index([0, 1])
197-
In [7]: index / np.array([0, 0], dtype=np.uint64)
198-
Out[7]: UInt64Index([0, 0], dtype='uint64')
184+
Division operations on ``Index`` and subclasses will now fill positive / 0 with ``np.inf``, negative / 0 with ``-np.inf``, and 0 / 0 with ``np.nan``. This matches existing ``Series`` behavior. (:issue:`19322`, :issue:`19347`)
199185

200186
Previous Behavior:
201187

@@ -207,6 +193,17 @@ Previous Behavior:
207193
index = pd.UInt64Index([0, 1])
208194
index / np.array([0, 0], dtype=np.uint64)
209195

196+
Current Behavior:
197+
198+
.. ipython:: python
199+
200+
index = pd.Index([-1, 0, 1])
201+
index / 0
202+
index / 0.0
203+
204+
index = pd.UInt64Index([0, 1])
205+
index / np.array([0, 0], dtype=np.uint64)
206+
210207
.. _whatsnew_0230.enhancements.other:
211208

212209
Other Enhancements

0 commit comments

Comments
 (0)