docs: def array_dim(arr):
      """Return the size of a multidimansional array.
      """
      dim = []
      while True:
          try:
              dim.append(len(arr))
              arr = arr[0]
          except TypeError:
              return dim