def _shape_repr(shape):
    if len(shape) == 0:
        return "()"
    joined = ", ".join("%d" % e for e in shape)
    if len(shape) == 1:
        # special notation for singleton tuples
        joined += ','
    return "(%s)" % joined
Return a platform independent reprensentation of an array shape
dataset/ETHPy150Open ibayer/fastFM/fastFM/validation.py/_shape_repr