21207986 / agpy

Automatically exported from code.google.com/p/agpy
MIT License
0 stars 0 forks source link

Error in plfit.py line 65 #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Error message:

 File "/usr/local/lib/python2.7/dist-packages/plfit/plfit.py", line 65, in __init__
    if (x<0).sum() > 0:
AttributeError: 'bool' object has no attribute 'sum'

Original issue reported on code.google.com by michaely...@gmail.com on 20 Apr 2012 at 12:09

GoogleCodeExporter commented 8 years ago
Can you give an example that causes this error?

Original comment by keflavich on 20 Apr 2012 at 6:06

GoogleCodeExporter commented 8 years ago
I got this issue too if I didn't first convert the list into a numpy array.

Original comment by alvin.ch...@gmail.com on 10 Nov 2012 at 8:18

GoogleCodeExporter commented 8 years ago
Thanks Alvin, that clarifies why the problem was happening.  The latest commit 
fixes this issue by forcing x to be a numpy array.

Original comment by keflavich on 10 Nov 2012 at 9:27