plan_dct(A, region, flags, tlim) should work for scalar A too