def dimension_div(a, b):
    """ How many times does b fit into a?

    >>> dimension_div(10, 5)
    2

    We round up
    >>> dimension_div(20, 9)
    3

    In the case of datashape.var, we resort to var
    >>> from datashape import var
    >>> dimension_div(var, 5)
    Var()
    >>> dimension_div(50, var)
    Var()
    """
    if a == datashape.var or b == datashape.var:
        return datashape.var
    if isinstance(a, Fixed):
        a = int(a)
    if isinstance(b, Fixed):
        b = int(b)
    return int(ceil(a / b))
dataset/ETHPy150Open blaze/blaze/blaze/expr/split.py/dimension_div/original