code: func (s Sample) Copy() *Sample {
  	xs := make([]float64, len(s.Xs))
  	copy(xs, s.Xs)
  
  	weights := []float64(nil)
  	if s.Weights != nil {
  		weights = make([]float64, len(s.Weights))
  		copy(weights, s.Weights)
  	}
  
  	return &Sample{xs, weights, s.Sorted}
  }
docs: // Copy returns a copy of the Sample.
  //
  // The returned Sample shares no data with the original, so they can
  // be modified (for example, sorted) independently.