diff --git a/.hgignore b/.hgignore index 5c4d4c7..e6a7aa1 100644 --- a/.hgignore +++ b/.hgignore @@ -7,3 +7,5 @@ build docs/_* dev stats_arrays.egg-info +.pytest_cache +.cache diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..205a2a1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# `stats_arrays` Changelog + +## 0.5.1 (11-05-2019) + +* Import from `collections.abc` when possible, for Python 3.8 support. diff --git a/MANIFEST.in b/MANIFEST.in index 1dcfa92..2891682 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ +include *.md include *.txt recursive-include stats_arrays *.py recursive-include docs *.rst diff --git a/setup.py b/setup.py index 7237b6e..12b2c4f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='stats_arrays', - version='0.5', + version='0.5.1', author='Chris Mutel', author_email='cmutel@gmail.com', url='https://bitbucket.org/cmutel/stats_arrays', diff --git a/stats_arrays/__init__.py b/stats_arrays/__init__.py index 7d41e0d..64e7396 100644 --- a/stats_arrays/__init__.py +++ b/stats_arrays/__init__.py @@ -1,6 +1,6 @@ # TODO: Write Monte Carlo tests -__version__ = (0, 5) +__version__ = (0, 5, 1) from .distributions import * from .uncertainty_choices import uncertainty_choices diff --git a/stats_arrays/random.py b/stats_arrays/random.py index 1538b81..24309d2 100644 --- a/stats_arrays/random.py +++ b/stats_arrays/random.py @@ -3,10 +3,13 @@ from .errors import UnknownUncertaintyType from .uncertainty_choices import * import numpy as np -import collections +try: + from collections.abc import Iterable +except ImportError: + from collections import Iterable -class RandomNumberGenerator(collections.Iterable): +class RandomNumberGenerator(Iterable): def __init__(self, uncertainty_type, params, size=1, maximum_iterations=100, seed=None, @@ -104,7 +107,7 @@ def __iter__(self): return self -class MCRandomNumberGenerator(collections.Iterable): +class MCRandomNumberGenerator(Iterable): u""" A Monte Carlo random number generator that operates on a :ref:`hpa`.