File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -824,7 +824,7 @@ def rank_1d(
824824 if values.dtype != np.object_:
825825 values = values.astype(' O' )
826826 else :
827- values = np.asarray(in_arr)
827+ values = np.asarray(in_arr).copy()
828828
829829 keep_na = na_option == ' keep'
830830
@@ -835,11 +835,6 @@ def rank_1d(
835835 elif rank_t is int64_t:
836836 mask = values == NPY_NAT
837837
838- # create copy in case of NPY_NAT
839- # values are mutated inplace
840- if mask.any():
841- values = values.copy()
842-
843838 # double sort first by mask and then by values to ensure nan values are
844839 # either at the beginning or the end. mask/(~mask) controls padding at
845840 # tail or the head
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ def test_show_versions(capsys):
3939 assert re .search (r"commit\s*:\s[0-9a-f]{40}\n" , result )
4040
4141 # check required dependency
42- assert re .search (r"numpy\s*:\s([0-9\.\+a-f\_]|dev)+\n" , result )
42+ # 2020-12-09 npdev has "dirty" in the tag
43+ assert re .search (r"numpy\s*:\s([0-9\.\+a-g\_]|dev)+(dirty)?\n" , result )
4344
4445 # check optional dependency
4546 assert re .search (r"pyarrow\s*:\s([0-9\.]+|None)\n" , result )
You can’t perform that action at this time.
0 commit comments