docs: public static NDArrayMessage of(INDArray arr, int[] dimensions, long index) {
          //allow null dimensions as long as index is -1
          if (dimensions == null) {
              dimensions = WHOLE_ARRAY_UPDATE;
          }
  
          //validate index being built
          if (index > 0) {
              if (dimensions.length > 1 || dimensions.length == 1 && dimensions[0] != -1)
                  throw new IllegalArgumentException(
                                  "Inconsistent message. Your index is > 0 indicating you want to send a whole ndarray message but your dimensions indicate you are trying to send a partial update. Please ensure you use a 1 length int array with negative 1 as an element or use NDArrayMesage.wholeArrayUpdate(ndarray) for creation instead");
          }
  
          return NDArrayMessage.builder().index(index).dimensions(dimensions).sent(getCurrentTimeUtc()).arr(arr).build();
      }