docs: public void setWeights(double[] weights, int[] weightLabels) {
          if (weights == null) throw new IllegalArgumentException("'weight' must not be null");
          if (weightLabels == null || weightLabels.length != weights.length)
              throw new IllegalArgumentException("'weightLabels' must have same length as 'weight'");
          this.weightLabel = copyOf(weightLabels, weightLabels.length);
          this.weight = copyOf(weights, weights.length);
      }