code: def put_scalar(self, name, val):
          
          if isinstance(val, np.floating):
              val = float(val)
          if isinstance(val, np.integer):
              val = int(val)
          self._dispatch(lambda m: m.process_scalar(name, val))
          s = create_scalar_summary(name, val)
          self._dispatch(lambda m: m.process_summary(s))
docs: Put a scalar.