<commit_before>from __future__ import division
import sys

from decimal import Decimal
import numpy as np
import numpy.random as nprand

from scipy.stats.distributions import (rv_discrete, rv_continuous, docdict,
                                       docdict_discrete)
import scipy.stats as stats
import scipy.optimize as optim
import scipy.special as special
import scipy.integrate as integrate

from ..misc import doc_sub, inherit_docstring_from


# Remove header from all methods
_docdict_allmeth = docdict['allmethods'][16:]
_docdict_discrete_allmeth = docdict_discrete['allmethods'][17:]

# **kwds in expect string followed by no space was throwing warning
_docdict_allmeth = _docdict_allmeth.replace(', **kwds','')

# Additional docstrings for custom methods
_docdict_rank_method = \
"""rank(n, %(shapes)s)
    Predicted rank abundance distribution.
"""

_docdict_extra_params = \
"""n : int
    number of values
data : array_like
    values used to fit distribution
"""

# Create docstring helpers
docdict['before_notes'] = ''.join([_docdict_rank_method,
                                   _docdict_allmeth,<commit_msg>Added docdict support for updated scipy<commit_after>from __future__ import division
import sys

from decimal import Decimal
import numpy as np
import numpy.random as nprand
from scipy.stats.distributions import (rv_discrete, rv_continuous)

try:
    from scipy.stats.distributions import (docdict, docdict_discrete)
except ImportError:
    # Scipy version  '0.14.0' support
    from scipy.stats._distn_infrastructure import (docdict, docdict_discrete)

import scipy.stats as stats
import scipy.optimize as optim
import scipy.special as special
import scipy.integrate as integrate

from ..misc import doc_sub, inherit_docstring_from


# Remove header from all methods
_docdict_allmeth = docdict['allmethods'][16:]
_docdict_discrete_allmeth = docdict_discrete['allmethods'][17:]

# **kwds in expect string followed by no space was throwing warning
_docdict_allmeth = _docdict_allmeth.replace(', **kwds','')

# Additional docstrings for custom methods
_docdict_rank_method = \
"""rank(n, %(shapes)s)
    Predicted rank abundance distribution.
"""

_docdict_extra_params = \
"""n : int
    number of values
data : array_like
    values used to fit distribution
"""

# Create docstring helpers
docdict['before_notes'] = ''.join([_docdict_rank_method,
                                   _docdict_allmeth,
{'fraction_non_alphanumeric': 0.07955482275350372, 'fraction_numerical': 0.00494641384995878, 'mean_word_length': 4.381374722838138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2470530', 'n_tokens_mistral': 753, 'n_tokens_neox': 728, 'n_words': 219}