Optional Numpy array of weights for the test samples, used for weighting the loss function. You can either pass a flat (1D) Numpy array with the same length as the input samples (1:1 mapping between weights and samples), or in the case of temporal data, you can pass a 2D array with shape (samples,sequence_length), to apply a different weight to every timestep of every sample. This argument is not supported when x is a dataset, instead pass sample weights as the third element of x.
As I understand, the sample here aligns very well with that in the aforementioned question, then my question is why we refer to a sample in machine learning a case in statistics? In statistics, a sample compromises multiple cases and is a part of a population.