refactor data_dim() [ wrapper for data_allocate() ]