def _check_scalar_array(obj, name, value):
    if value is None:
        return None
    arr = numpy.asarray(value)
    assert len(arr.shape) in [2,3], "Scalar array must be 2 or 3 dimensional"
    vd = obj.vector_data
    if vd is not None:
        assert vd.shape[:-1] == arr.shape, \
               "Scalar array must match already set vector data.\n"\
               "vector_data.shape = %s, given array shape = %s"%(vd.shape,
                                                                 arr.shape)
    return arr
Verify redirect to HTTPS
dataset/ETHPy150Open enthought/mayavi/mayavi/sources/array_source.py/_check_scalar_array--crossover with--dataset/ETHPy150Open letsencrypt/letsencrypt/certbot/interfaces.py/IValidator.redirect