Skip to content

Commit 6f886d7

Browse files
committed
test: add test to check for read-only cut
1 parent b5f1e71 commit 6f886d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/reshape/test_tile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ def f():
512512
tm.assert_numpy_array_equal(
513513
mask, np.array([False, True, True, True, True]))
514514

515+
def test_cut_read_only(self):
516+
bins = np.arange(0, 100, 10)
517+
bins.flags.writeable = False
518+
cut(np.arange(100), bins)
519+
515520

516521
def curpath():
517522
pth, _ = os.path.split(os.path.abspath(__file__))

0 commit comments

Comments
 (0)