@@ -623,7 +623,14 @@ def test_setitem_larray(self):
623
623
raw [[1 , 5 , 9 ]] = raw [[1 , 5 , 9 ]] + 25.0
624
624
self ._assert_equal_raw (la , raw )
625
625
626
- # b) value has an extra length-1 axis
626
+ # b) value has exactly the same shape but VG is at a "wrong" position
627
+ la = self .larray .copy ()
628
+ # same raw as previous test
629
+
630
+ la [geo [:], ages1_5_9 ] = la [ages1_5_9 ] + 25.0
631
+ self ._assert_equal_raw (la , raw )
632
+
633
+ # c) value has an extra length-1 axis
627
634
la = self .larray .copy ()
628
635
raw = self .array .copy ()
629
636
@@ -636,14 +643,14 @@ def test_setitem_larray(self):
636
643
raw [[1 , 5 , 9 ]] = raw [[1 , 5 , 9 ]] + 26.0
637
644
self ._assert_equal_raw (la , raw )
638
645
639
- # c ) value has the same axes than target but one has length 1
646
+ # d ) value has the same axes than target but one has length 1
640
647
la = self .larray .copy ()
641
648
raw = self .array .copy ()
642
649
raw [[1 , 5 , 9 ]] = np .sum (raw [[1 , 5 , 9 ]], axis = 1 , keepdims = True )
643
650
la [ages1_5_9 ] = la [ages1_5_9 ].sum (geo = (geo .all (),))
644
651
self ._assert_equal_raw (la , raw )
645
652
646
- # d ) value has a missing dimension
653
+ # e ) value has a missing dimension
647
654
la = self .larray .copy ()
648
655
la [ages1_5_9 ] = la [ages1_5_9 ].sum (geo )
649
656
# we use "raw" from previous test
0 commit comments