Fix test to use 2d table for weights.