DLS C5 W1 A2 - Help with ValueError: 'a' and 'p' must have same size

In addition to Tom’s points, here’s a thread which shows the sizes of the various values in this function. Please compare your results to what you see there and maybe that will give some insight.