def test_feat_factor():
    gold_filtsz = [random.randint(1, 10) for _ in range(random.randint(2, 6))]
    feat_factor = random.randint(10, 25)
    max_feat = random.randint(30, 40)
    gold_nfeats = np.minimum((np.array(gold_filtsz) * feat_factor), max_feat)
    (filtsz, nfeats) = calc_nfeats(gold_filtsz, feat_factor, max_feat)
    np.testing.assert_equal(filtsz, gold_filtsz)
    np.testing.assert_equal(nfeats, gold_nfeats)
def test_feat_factor():
    gold_filtsz = [random.randint(1, 10) for _ in range(random.randint(2, 6))]
    feat_factor = random.randint(10, 25)
    max_feat = random.randint(30, 40)
    gold_nfeats = np.minimum((np.array(gold_filtsz) * feat_factor), max_feat)
    (filtsz, nfeats) = calc_nfeats(gold_filtsz, feat_factor, max_feat)
    np.testing.assert_equal(filtsz, gold_filtsz)
    np.testing.assert_equal(nfeats, gold_nfeats)