add core.utils.as_shape