@@ -1814,14 +1814,16 @@ def test_interpolation_stage_rgba_respects_alpha_param(fig_test, fig_ref, intp_s
1814
1814
axs_ref [1 ][0 ].imshow (im_rgb , alpha = array_alpha )
1815
1815
axs_tst [1 ][1 ].imshow (im_rgba , interpolation_stage = intp_stage , alpha = scalar_alpha )
1816
1816
axs_ref [1 ][1 ].imshow (
1817
- np .concatenate ( # combine rgb channels with scaled array alpha
1818
- (im_rgb , scalar_alpha * array_alpha .reshape ((ny , nx , 1 ))), axis = - 1
1819
- ), interpolation_stage = intp_stage
1820
- )
1817
+ np .concatenate (
1818
+ (im_rgb ,
1819
+ (1 - (1 - array_alpha ) * (1 - scalar_alpha )).reshape ((ny , nx , 1 ))),
1820
+ axis = - 1 ),
1821
+ interpolation_stage = intp_stage )
1821
1822
new_array_alpha = np .random .rand (ny , nx )
1822
1823
axs_tst [1 ][2 ].imshow (im_rgba , interpolation_stage = intp_stage , alpha = new_array_alpha )
1823
1824
axs_ref [1 ][2 ].imshow (
1824
- np .concatenate ( # combine rgb channels with new array alpha
1825
- (im_rgb , new_array_alpha .reshape ((ny , nx , 1 ))), axis = - 1
1826
- ), interpolation_stage = intp_stage
1827
- )
1825
+ np .concatenate (
1826
+ (im_rgb ,
1827
+ (1 - (1 - array_alpha ) * (1 - new_array_alpha )).reshape ((ny , nx , 1 ))),
1828
+ axis = - 1 ),
1829
+ interpolation_stage = intp_stage )
0 commit comments