Skip to content

Commit

Permalink
0.5.1. Python 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed May 11, 2019
1 parent 9860734 commit d79253b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .hgignore
Expand Up @@ -7,3 +7,5 @@ build
docs/_*
dev
stats_arrays.egg-info
.pytest_cache
.cache
5 changes: 5 additions & 0 deletions 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.
1 change: 1 addition & 0 deletions MANIFEST.in
@@ -1,3 +1,4 @@
include *.md
include *.txt
recursive-include stats_arrays *.py
recursive-include docs *.rst
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
9 changes: 6 additions & 3 deletions stats_arrays/random.py
Expand Up @@ -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,
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit d79253b

Please sign in to comment.