Skip to content

Commit e360318

Browse files
committed
Merge commit 'v0.16.2-65-g054821d' into debian
* commit 'v0.16.2-65-g054821d': TST: 32-test fixes BUG: GH9907 generate_range when start and end have higher resolution than offset TST/CLN: remove assert_isinstance PERF: releasing the GIL, pandas-dev#8882 PERF: vbenches for pandas-dev#8882, releasing the GIL
2 parents 9c72d0f + 054821d commit e360318

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3425
-2959
lines changed

doc/source/whatsnew/v0.17.0.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ users upgrade to this version.
1313

1414
Highlights include:
1515

16+
- Release the Global Interpreter Lock (GIL) on some cython operations, see :ref:`here <whatsnew_0170.gil>`
1617

1718
Check the :ref:`API Changes <whatsnew_0170.api>` and :ref:`deprecations <whatsnew_0170.deprecations>` before updating.
1819

@@ -58,8 +59,32 @@ Deprecations
5859
Removal of prior version deprecations/changes
5960
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6061

62+
.. _dask: https://dask.readthedocs.org/en/latest/
63+
64+
.. _whatsnew_0170.gil:
65+
66+
Releasing the GIL
67+
~~~~~~~~~~~~~~~~~
68+
69+
We are releasing the global-interpreter-lock (GIL) on some cython operations.
70+
This will allow other threads to run simultaneously during computation, potentially allowing performance improvements
71+
from multi-threading. Notably ``groupby`` and some indexing operations are a benefit from this. (:issue:`8882`)
72+
73+
For example the groupby expression in the following code will have the GIL released during the factorization step, e.g. ``df.groupby('key')``
74+
as well as the ``.sum()`` operation.
75+
76+
.. code-block:: python
77+
78+
N = 1e6
79+
df = DataFrame({'key' : np.random.randint(0,ngroups,size=N),
80+
'data' : np.random.randn(N) })
81+
df.groupby('key')['data'].sum()
82+
83+
Releasing of the GIL could benefit an application that uses threads for user interactions (e.g. ``QT``), or performaning multi-threaded computations. A nice example of a library that can handle these types of computation-in-parallel is the dask_ library.
84+
6185
.. _whatsnew_0170.performance:
6286

87+
6388
Performance Improvements
6489
~~~~~~~~~~~~~~~~~~~~~~~~
6590
- Added vbench benchmarks for alternative ExcelWriter engines and reading Excel files (:issue:`7171`)
@@ -90,12 +115,14 @@ Bug Fixes
90115

91116

92117
- Bug in ``Table.select_column`` where name is not preserved (:issue:`10392`)
118+
- Bug in ``offsets.generate_range`` where ``start`` and ``end`` have finer precision than ``offset`` (:issue:`9907`)
93119

94120

95121
- Bug in ``DataFrame.interpolate`` with ``axis=1`` and ``inplace=True`` (:issue:`10395`)
96122

97123

98124

125+
99126
- Bug in ``test_categorical`` on big-endian builds (:issue:`10425`)
100127

101128

pandas/core/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,6 @@ def take_nd(arr, indexer, axis=0, out=None, fill_value=np.nan,
839839

840840
func = _get_take_nd_function(arr.ndim, arr.dtype, out.dtype,
841841
axis=axis, mask_info=mask_info)
842-
843842
indexer = _ensure_int64(indexer)
844843
func(arr, indexer, out, fill_value)
845844

0 commit comments

Comments
 (0)