def _normalize_shape(shape):

    if isinstance(shape, (int, numpy.integer, int)):
        if shape < 1:
            raise ValueError("shape value must be greater than 0: %d"
                             % shape)
        shape = (shape,)  # N is a shorthand for (N,)
    try:
        shape = tuple(shape)
    except TypeError:
        raise TypeError("shape must be an integer or sequence: %r"
                        % (shape,))

    # XXX Get from HDF5 library if possible.
    # HDF5 does not support ranks greater than 32
    if len(shape) > 32:
        raise ValueError(
            "shapes with rank > 32 are not supported: %r" % (shape,))

    return tuple(SizeType(s) for s in shape)
Loads a shader from disk
dataset/ETHPy150Open PyTables/PyTables/tables/atom.py/_normalize_shape--crossover with--dataset/ETHPy150Open tobspr/RenderPipeline/rpcore/loader.py/RPLoader.load_shader