Premium problem103. Binomial Draws (Generator API)

Medium Locked

Using the modern Generator random API with the PCG64 bit generator, seeded with 365, draw a shape-shaped array from a binomial distribution with n trials and success probability p.

Input

n = 100
p = 0.4
shape = (5, 5)

Output

[[42 44 30 36 45]
 [36 41 38 42 41]
 [35 31 35 46 29]
 [41 41 46 34 48]
 [45 45 45 40 43]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)