code: private ValFrame scalar_op_frame(final double d, Frame fr) {
      Frame res = new MRTask() {
        @Override
        public void map(Chunk[] chks, NewChunk[] cress) {
          for (int c = 0; c < chks.length; c++) {
            Chunk chk = chks[c];
            NewChunk cres = cress[c];
            for (int i = 0; i < chk._len; i++)
              cres.addNum(op(d, chk.atd(i)));
          }
        }
      }.doAll(fr.numCols(), Vec.T_NUM, fr).outputFrame(fr._names, null);
      return cleanCategorical(fr, res); // Cleanup categorical misuse
    }
docs: Auto-widen the scalar to every element of the frame