code: def array2string(arr: numpy.ndarray) -> str:
          
          shape = str(arr.shape)[1:-1]
          if shape.endswith(","):
              shape = shape[:-1]
          return numpy.array2string(arr, threshold=11) + "%s[%s]" % (arr.dtype, shape)
docs: Format numpy array as a string.