On learning parametric distributions from quantized samples