File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -824,7 +824,7 @@ def rank_1d(
824
824
if values.dtype != np.object_:
825
825
values = values.astype(' O' )
826
826
else :
827
- values = np.asarray(in_arr)
827
+ values = np.asarray(in_arr).copy()
828
828
829
829
keep_na = na_option == ' keep'
830
830
@@ -835,11 +835,6 @@ def rank_1d(
835
835
elif rank_t is int64_t:
836
836
mask = values == NPY_NAT
837
837
838
- # create copy in case of NPY_NAT
839
- # values are mutated inplace
840
- if mask.any():
841
- values = values.copy()
842
-
843
838
# double sort first by mask and then by values to ensure nan values are
844
839
# either at the beginning or the end. mask/(~mask) controls padding at
845
840
# tail or the head
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ def test_show_versions(capsys):
39
39
assert re .search (r"commit\s*:\s[0-9a-f]{40}\n" , result )
40
40
41
41
# 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 )
43
44
44
45
# check optional dependency
45
46
assert re .search (r"pyarrow\s*:\s([0-9\.]+|None)\n" , result )
You can’t perform that action at this time.
0 commit comments