You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The low level Cython routine for outer_join_indexer uses the wrong size to handle the special case that the right array is empty (see: https://github.com/pydata/pandas/blob/master/pandas/src/generate_code.py#L2134). The fix is simple: if the right array is empty (nright == 0), it should of course loop and copy the left array (for i in range(nleft)).
Due to this bug, the merged index and both indexers are never written when the right array is empty:
In [91]: from pandas.algos import outer_join_indexer_float64
In [92]: outer_join_indexer_float64(array([1.,2.,3.]), array([]))
Out[92]:
(array([ 6.92981993e-310, 2.56210349e-316, 4.27255699e+180]),
array([140261116804248, 140261116804248, 140260374492336]),
array([140261116804232, 140261116804232, 50534992]))
Index.union already preempts this special case separately, so this bug will only affect a handful of people that interact directly with the Cython algos. If desired, I could prepare a PR tomorrow, though it might be overkill for such a small change.
The text was updated successfully, but these errors were encountered:
The low level Cython routine for outer_join_indexer uses the wrong size to handle the special case that the right array is empty (see: https://github.com/pydata/pandas/blob/master/pandas/src/generate_code.py#L2134). The fix is simple: if the right array is empty (
nright == 0
), it should of course loop and copy the left array (for i in range(nleft)
).Due to this bug, the merged index and both indexers are never written when the right array is empty:
Index.union
already preempts this special case separately, so this bug will only affect a handful of people that interact directly with the Cython algos. If desired, I could prepare a PR tomorrow, though it might be overkill for such a small change.The text was updated successfully, but these errors were encountered: