diff --git a/README.md b/README.md index 5d77438..de37d7f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # pylevy ## Levy distributions for Python -====== To install, type: diff --git a/docs/source/conf.py b/docs/source/conf.py index 73d6956..5a9025d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,7 @@ # import os import sys -from unittest.mock import MagicMock +import unittest.mock as mock sys.path.insert(0, os.path.abspath('../../../')) # -- Project information ----------------------------------------------------- @@ -45,14 +45,16 @@ ] -class Mock(MagicMock): - @classmethod - def __getattr__(cls, name): - return MagicMock() +# class Mock(MagicMock): +# @classmethod +# def __getattr__(cls, name): +# return MagicMock() MOCK_MODULES = ['numpy', 'scipy'] -sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = mock.Mock() + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/source/levy.rst b/docs/source/levy.rst index 34c3b09..29a477c 100644 --- a/docs/source/levy.rst +++ b/docs/source/levy.rst @@ -1,8 +1,11 @@ Module Levy -========== +============ .. automodule:: pylevy.levy +Functions +---------- + .. autofunction:: pylevy.levy.change_par .. autofunction:: pylevy.levy.random diff --git a/levy/__init__.py b/levy/__init__.py index 32709b6..db881cb 100644 --- a/levy/__init__.py +++ b/levy/__init__.py @@ -26,9 +26,9 @@ It operates by interpolating values from a table, as direct computation of these distributions requires a lengthy numerical integration. This -interpolation scheme allows fast fitting of data by Maximum Likelihood . +interpolation scheme allows fast fitting of data by Maximum Likelihood. -Does not support alpha values less than 0.5. +It does not support alpha values less than 0.5. """ from __future__ import print_function, division diff --git a/test.py b/test.py index 8bccd5c..355af1b 100644 --- a/test.py +++ b/test.py @@ -9,13 +9,13 @@ import levy import numpy as np from builtins import range -# from matplotlib import pyplot def get_quantiles(l): n = float(len(l)) return l[int(n * 0.5)], l[int(n * 0.05)], l[int(n * 0.95)] + alpha = 1.0 beta = 0.0 mu = 0.0