diff options
-rw-r--r-- | doc/release/upcoming_changes/12065.performance.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/release/upcoming_changes/12065.performance.rst b/doc/release/upcoming_changes/12065.performance.rst index 8ca436c32..ff7605d3e 100644 --- a/doc/release/upcoming_changes/12065.performance.rst +++ b/doc/release/upcoming_changes/12065.performance.rst @@ -2,7 +2,10 @@ Faster version of ``np.isin`` and ``np.in1d`` for integer arrays ---------------------------------------------------------------- ``np.in1d`` (used by ``np.isin``) can now switch to a faster algorithm (up to >10x faster) when it is fed two integer arrays. -The algorithm bears similarities to a counting sort in that it -uses the ``test_elements`` argument to index a boolean helper -array with ``True`` values where elements exist. The ``element`` -argument simply indexes this array of booleans.
\ No newline at end of file +The algorithm has similarities to a counting sort in that it +uses the ``ar2`` (``test_elements`` in ``np.isin``) argument to +index a boolean array, setting them to ``True`` where elements exist. +The ``ar1`` (``elements`` in ``np.isin``) argument then indexes +this array of booleans. Different memory scaling is also encountered, +and can be smaller or larger depending on configuration; this is described +in the docstring.
\ No newline at end of file |