code: public AttributeVector column(int i) {
          if (i < 0 || i >= attributes.length) {
              throw new IllegalArgumentException("Invalid column index: " + i);
          }
  
          double[] vector = new double[size()];
          for (int j = 0; j < vector.length; j++) {
              vector[j] = data.get(j).x[i];
          }
  
          return new AttributeVector(attributes[i], vector);
      }
docs: Returns a column.