This line doesn't work for me unless I cast roi[..., None] as type boolean.