Skip to content

Commit

Permalink
DOC: Add notes about truedivision
Browse files Browse the repository at this point in the history
  • Loading branch information
jtratner committed Nov 5, 2013
1 parent 57f4c03 commit 98857c1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,25 @@ API Changes
dates are given (:issue:`5242`)
- ``Timestamp`` now supports ``now/today/utcnow`` class methods
(:issue:`5339`)
- **All** division with ``NDFrame`` - likes is now truedivision, regardless
of the future import. You can use ``//`` and ``floordiv`` to do integer
division.

.. code-block:: python
In [3]: arr = np.array([1, 2, 3, 4])
In [4]: arr2 = np.array([5, 3, 2, 1])
In [5]: arr / arr2
Out[5]: array([0, 0, 1, 4])
In [6]: pd.Series(arr) / pd.Series(arr2) # no future import required
Out[6]:
0 0.200000
1 0.666667
2 1.500000
3 4.000000
dtype: float64
Internal Refactoring
~~~~~~~~~~~~~~~~~~~~
Expand Down
20 changes: 20 additions & 0 deletions doc/source/v0.13.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ API changes
# and all methods take an inplace kwarg - but returns None
index.set_names(["bob", "cranberry"], inplace=True)

- **All** division with ``NDFrame`` - likes is now truedivision, regardless
of the future import. You can use ``//`` and ``floordiv`` to do integer
division.

.. code-block:: python
In [3]: arr = np.array([1, 2, 3, 4])

In [4]: arr2 = np.array([5, 3, 2, 1])

In [5]: arr / arr2
Out[5]: array([0, 0, 1, 4])

In [6]: pd.Series(arr) / pd.Series(arr2) # no future import required
Out[6]:
0 0.200000
1 0.666667
2 1.500000
3 4.000000
dtype: float64

- Infer and downcast dtype if ``downcast='infer'`` is passed to ``fillna/ffill/bfill`` (:issue:`4604`)
- ``__nonzero__`` for all NDFrame objects, will now raise a ``ValueError``, this reverts back to (:issue:`1073`, :issue:`4633`)
behavior. See :ref:`gotchas<gotchas.truth>` for a more detailed discussion.
Expand Down

0 comments on commit 98857c1

Please sign in to comment.