def METHOD_NAME(self, weight):
    expected_exc = TypeError
    arr_np = np.arange(2)
    arr_num = num.arange(2)
    w_np = np.array(weight)
    w_num = num.array(weight)
    with pytest.raises(expected_exc):
        # TypeError: Cannot cast array data from dtype('<U1') to
        # dtype('float64') according to the rule 'safe'
        np.bincount(arr_np, weights=w_np)
    with pytest.raises(expected_exc):
        # - does not raise exception when the values can be casted float64
        # - raises ValueError when weights are complex types
        # - other dtype will hit ValueError that bubbles from eager.py:
        #   could not convert string to float: 'x'
        num.bincount(arr_num, weights=w_num)