code: def one(self):
          
          # See zero() for remarks
          def one_vec(x, out=None, **kwargs):
              """One function, vectorized."""
              if is_valid_input_meshgrid(x, self.domain.ndim):
                  scalar_out_shape = out_shape_from_meshgrid(x)
              elif is_valid_input_array(x, self.domain.ndim):
                  scalar_out_shape = out_shape_from_array(x)
              else:
                  raise TypeError('invalid input type')
  
              out_shape = self.out_shape + scalar_out_shape
  
              if out is None:
                  return np.ones(out_shape, dtype=self.scalar_out_dtype)
              else:
                  fill_value = np.ones(1, dtype=self.scalar_out_dtype)[0]
                  out.fill(fill_value)
  
          return self.element_type(self, one_vec)
docs: Function mapping anything to one.