code: def element(self, inp=None):
          
          if inp is None:
              return self.mid_pt
          elif inp in self:
              if self.ndim == 1:
                  return float(inp)
              else:
                  return np.asarray(inp)
          else:
              raise TypeError('`inp` {!r} is not a valid element of {!r}'
                              ''.format(inp, self))
docs: Return an element of this interval product.
  
          Parameters
          ----------
          inp : float or `array-like`, optional
              Point to be cast to an element.
  
          Returns
          -------
          element : `numpy.ndarray` or float
              Array (`ndim` > 1) or float version of ``inp`` if provided,
              otherwise ``self.mid_pt``.
  
          Examples
          --------
          >>> interv = IntervalProd(0, 1)
          >>> interv.element(0.5)
          0.5