@@ -512,17 +512,20 @@ def f():
512
512
tm .assert_numpy_array_equal (
513
513
mask , np .array ([False , True , True , True , True ]))
514
514
515
- def test_cut_read_only (self ):
515
+ @pytest .mark .parametrize ("array_1_writeable,array_2_writeable" ,[
516
+ (True , True ), (True , False ), (False , False )])
517
+ def test_cut_read_only (self , array_1_writeable , array_2_writeable ):
516
518
# issue 18773
517
- readonly = np .arange (0 , 100 , 10 )
518
- readonly .flags .writeable = False
519
+ array_1 = np .arange (0 , 100 , 10 )
520
+ array_1 .flags .writeable = array_1_writeable
519
521
520
- mutable = np .arange (0 , 100 , 10 )
522
+ array_2 = np .arange (0 , 100 , 10 )
523
+ array_2 .flags .writeable = array_2_writeable
521
524
522
525
hundred_elements = np .arange (100 )
523
- tm .assert_categorical_equal (cut (hundred_elements , readonly ),
524
- cut (hundred_elements , mutable ))
525
526
527
+ tm .assert_categorical_equal (cut (hundred_elements , array_1 ),
528
+ cut (hundred_elements , array_2 ))
526
529
527
530
def curpath ():
528
531
pth , _ = os .path .split (os .path .abspath (__file__ ))
0 commit comments