subsample to get mean. fixed intensity size bug for gpuarray