From 6a3c80fb11d60569328e751bab7b664ed6a7967e Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Mon, 20 Jun 2022 14:00:30 -0400 Subject: DOC: Improve clarity of in1d docstring --- numpy/lib/arraysetops.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy/lib/arraysetops.py') diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index 56080382c..a6a0d99cb 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -547,8 +547,8 @@ def in1d(ar1, ar2, assume_unique=False, invert=False, kind=None): to (but is faster than) ``np.invert(in1d(a, b))``. kind : {None, 'sort', 'table'}, optional The algorithm to use. This will not affect the final result, - but will affect the speed. Default will select automatically - based on memory considerations. + but will affect the speed and memory use. The default, None, + will select automatically based on memory considerations. * If 'sort', will use a mergesort-based approach. This will have a memory usage of roughly 6 times the sum of the sizes of @@ -560,7 +560,7 @@ def in1d(ar1, ar2, assume_unique=False, invert=False, kind=None): to be the faster method if the following formula is true: ``log10(len(ar2)) > (log10(max(ar2)-min(ar2)) - 2.27) / 0.927``, but may use greater memory. - * If `None`, will automatically choose 'table' if + * If None, will automatically choose 'table' if the required memory allocation is less than or equal to 6 times the sum of the sizes of `ar1` and `ar2`, otherwise will use 'sort'. This is done to not use @@ -761,8 +761,8 @@ def isin(element, test_elements, assume_unique=False, invert=False, than) ``np.invert(np.isin(a, b))``. kind : {None, 'sort', 'table'}, optional The algorithm to use. This will not affect the final result, - but will affect the speed. Default will select automatically - based on memory considerations. + but will affect the speed and memory use. The default, None, + will select automatically based on memory considerations. * If 'sort', will use a mergesort-based approach. This will have a memory usage of roughly 6 times the sum of the sizes of @@ -774,7 +774,7 @@ def isin(element, test_elements, assume_unique=False, invert=False, to be the faster method if the following formula is true: ``log10(len(ar2)) > (log10(max(ar2)-min(ar2)) - 2.27) / 0.927``, but may use greater memory. - * If `None`, will automatically choose 'table' if + * If None, will automatically choose 'table' if the required memory allocation is less than or equal to 6 times the sum of the sizes of `ar1` and `ar2`, otherwise will use 'sort'. This is done to not use -- cgit v1.2.1