code: public static Basic2DMatrix fromBinary(byte[] array) {
          ByteBuffer buffer = ByteBuffer.wrap(array);
  
          if (buffer.get() != MATRIX_TAG) {
              throw new IllegalArgumentException("Can not decode Basic2DMatrix from the given byte array.");
          }
  
          int rows = buffer.getInt();
          int columns = buffer.getInt();
          double[][] values = new double[rows][columns];
  
          for (int i = 0; i < rows; i++) {
              for (int j = 0; j < columns; j++) {
                  values[i][j] = buffer.getDouble();
              }
          }
  
          return new Basic2DMatrix(values);
      }
docs: Decodes {@link Basic2DMatrix} from the given byte {@code array}.
  
  @param array the byte array representing a matrix
  
  @return a decoded matrix