code: def asarray(self, out=None):
          
          if not self.space.is_power_space:
              raise ValueError('cannot use `asarray` if `space.is_power_space` '
                               'is `False`')
          else:
              if out is None:
                  out = np.empty(self.shape, self.dtype)
  
              for i in range(len(self)):
                  out[i] = np.asarray(self[i])
              return out
docs: Extract the data of this vector as a numpy array.
  
          Only available if `is_power_space` is True.
  
          The ordering is such that it commutes with indexing::
  
              self[ind].asarray() == self.asarray()[ind]
  
          Parameters
          ----------
          out : `numpy.ndarray`, optional
              Array in which the result should be written in-place.
              Has to be contiguous and of the correct dtype and
              shape.
  
          Raises
          ------
          ValueError
              If `is_power_space` is false.
  
          Examples
          --------
          >>> spc = odl.ProductSpace(odl.rn(3), 2)
          >>> x = spc.element([[ 1.,  2.,  3.],
          ...                  [ 4.,  5.,  6.]])
          >>> x.asarray()
          array([[ 1.,  2.,  3.],
                 [ 4.,  5.,  6.]])