title: How to use norm.ppf with a loc, scale and x as numpy array?
body: <p>I am using scipy.stats.norm package to calculate CDF and ICDF. I want to pass loc and scale parameter as numpy array and want result for same number of x values. The norm.cdf function is returning good result (see below):</p>
  
  <pre><code>&gt;&gt;&gt; norm.cdf([0.1, 0.2, 0.3], loc = [2, 3, 4], scale = [0, 1, 2])
  array([        NaN,  0.00255513,  0.03215677])
  </code></pre>
  
  <p>While norm.ppf function for finding ICDF is giving me error:</p>
  
  <pre><code>&gt;&gt;&gt; norm.ppf([0.1, 0.2, 0.3], loc = [2, 3, 4], scale = [0, 1, 2])
      Traceback (most recent call last):
    File "&lt;pyshell#16&gt;", line 1, in &lt;module&gt;
      norm.ppf([0.1, 0.2, 0.3], loc = [2, 3, 4], scale = [0, 1, 2])
    File "C:\Python\lib\site-packages\scipy\stats\distributions.py", line 718, in ppf
      output = valarray(shape(cond),value=self.a*scale + loc)
    File "C:\Python\lib\site-packages\scipy\stats\distributions.py", line 235, in valarray
      out = reshape(repeat([value],product(shape,axis=0),axis=0),shape)
    File "C:\Python\lib\site-packages\numpy\core\fromnumeric.py", line 152, in reshape
      return reshape(newshape, order=order)
  ValueError: total size of new array must be unchanged
  </code></pre>
  
  <p>I dont want to loop through it multiple times as my number of loc, scale and x values are large in number.
  Could you please help me to solve this with numpy vectorization? Many thanks:)</p>