docs: def red_dim(self, array):
          """
          This function reduces the dimensions of an array until it is
          no longer of length 1.
  
          """
          while isinstance(array, list) == True or \
          isinstance(array, np.ndarray) == True:
              try:
                  if len(array) == 1:
                      array = array[0]
                  else:
                      break
              except:
                  break
  
          return array