Skip to content

Commit bf583c0

Browse files
xhochyjreback
authored andcommitted
Add unit test for #12813 (#21811)
1 parent 6008d75 commit bf583c0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/source/whatsnew/v0.24.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ Numeric
331331
^^^^^^^
332332

333333
- Bug in :class:`Series` ``__rmatmul__`` doesn't support matrix vector multiplication (:issue:`21530`)
334+
- Bug in :func:`factorize` fails with read-only array (:issue:`12813`)
334335
-
335336
-
336337

pandas/tests/test_algos.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,9 @@ def test_complex_sorting(self):
231231

232232
pytest.raises(TypeError, algos.factorize, x17[::-1], sort=True)
233233

234-
def test_uint64_factorize(self):
234+
def test_uint64_factorize(self, writable):
235235
data = np.array([2**63, 1, 2**63], dtype=np.uint64)
236+
data.setflags(write=writable)
236237
exp_labels = np.array([0, 1, 0], dtype=np.intp)
237238
exp_uniques = np.array([2**63, 1], dtype=np.uint64)
238239

0 commit comments

Comments
 (0)