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