def ishomogeneous(ds):
    ds = dshape(ds)
    return len(set(remove(isdimension, collect(isscalar, ds)))) == 1
Does datashape contain only one dtype?
dataset/ETHPy150Open blaze/datashape/datashape/predicates.py/ishomogeneous