problem with scipy.stats.distributions ?
Hello, I recently update to numpy 1.0b5 and scipy 0.5.1, and I'm running into this message: #....................................................................
scipy.stats.distributions.norm.ppf(0.95)
/usr/lib64/python2.4/site-packages/scipy/stats/distributions.py in ppf(self, q, *args, **kwds) 551 place(output,cond2,self.b*scale + loc) 552 goodargs = argsreduce(cond, *((q,)+args+(scale,loc))) --> 553 scale, loc, goodargs = goodargs[-2], goodargs[-1], goodargs[:-2] 554 place(output,cond,self._ppf(*goodargs)*scale + loc) 555 return output /usr/lib64/python2.4/site-packages/numpy/lib/function_base.py in insert(arr, obj, values, axis) 1165 if (obj < 0): obj += N 1166 if (obj < 0 or obj >=N): -> 1167 raise ValueError, "index (%d) out of range (0<=index<=%d) "\ 1168 "in dimension %d" % (obj, N, axis) 1169 newshape[axis] += 1; ValueError: index (1) out of range (0<=index<=1) in dimension 0 #.................................................................. Would anybody have any idea of what it means ? Thx in advance P.
PGM wrote:
Hello, I recently update to numpy 1.0b5 and scipy 0.5.1, and I'm running into this message: #....................................................................
scipy.stats.distributions.norm.ppf(0.95)
Hmm works here: In [2]: scipy.stats.distributions.norm.ppf(0.95) Out[2]: array(1.6448536269514722) In [3]: import numpy In [4]: numpy.__version__ Out[4]: '1.0b5.dev3100' In [5]: scipy.__version__ Out[5]: '0.5.1.dev2185' -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible.
PGM wrote:
Hello, I recently update to numpy 1.0b5 and scipy 0.5.1, and I'm running into this message: #....................................................................
scipy.stats.distributions.norm.ppf(0.95)
/usr/lib64/python2.4/site-packages/scipy/stats/distributions.py in ppf(self, q, *args, **kwds) 551 place(output,cond2,self.b*scale + loc) 552 goodargs = argsreduce(cond, *((q,)+args+(scale,loc))) --> 553 scale, loc, goodargs = goodargs[-2], goodargs[-1], goodargs[:-2] 554 place(output,cond,self._ppf(*goodargs)*scale + loc) 555 return output
/usr/lib64/python2.4/site-packages/numpy/lib/function_base.py in insert(arr, obj, values, axis) 1165 if (obj < 0): obj += N 1166 if (obj < 0 or obj >=N): -> 1167 raise ValueError, "index (%d) out of range (0<=index<=%d) "\ 1168 "in dimension %d" % (obj, N, axis) 1169 newshape[axis] += 1;
It looks like you have an old .pyc file that is being picked up and confusing the interpreter. Try clearing out the site-packages/scipy and site-packages/numpy directories and installing again. -Travis
participants (3)
-
PGM -
Steve Schmerler -
Travis Oliphant