From 24e3665db6066240d537541c6f281b6411778767 Mon Sep 17 00:00:00 2001 From: John Bogaardt Date: Tue, 3 Dec 2019 18:15:58 -0700 Subject: [PATCH] patch to grain method --- chainladder/__init__.py | 2 +- chainladder/core/triangle.py | 4 ++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chainladder/__init__.py b/chainladder/__init__.py index 118bac2e..7468fc20 100644 --- a/chainladder/__init__.py +++ b/chainladder/__init__.py @@ -5,4 +5,4 @@ from chainladder.methods import * # noqa (API Import) from chainladder.workflow import * # noqa (API Import) -__version__ = '0.4.3' +__version__ = '0.4.4' diff --git a/chainladder/core/triangle.py b/chainladder/core/triangle.py index d4abf16d..b9cc4fd7 100644 --- a/chainladder/core/triangle.py +++ b/chainladder/core/triangle.py @@ -398,8 +398,8 @@ def grain(self, grain='', inplace=False): obj.values = new_tri obj.odims = np.unique(o) obj.valuation = obj._valuation_triangle() - if type(self.ddims) == np.ndarray: - obj = obj.val_to_dev(inplace=True) + del obj._nan_triangle_ + obj = obj.val_to_dev(inplace=True) # Now do development dev_grain_dict = {'M': {'Y': 12, 'Q': 3, 'M': 1}, 'Q': {'Y': 4, 'Q': 1}, diff --git a/setup.py b/setup.py index 7ee81a53..c257941e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ descr = "Chainladder Package - P&C Loss Reserving package " name = 'chainladder' url = 'https://github.com/jbogaardt/chainladder-python' -version='0.4.3' # Put this in __init__.py +version='0.4.4' # Put this in __init__.py data_path = '' setup(