Skip to content

Commit

Permalink
Update common.py (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogaardt authored Apr 3, 2024
1 parent 0a0d0cb commit bf9a630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chainladder/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def set_backend(self, backend, inplace=False, deep=False, **kwargs):
def _validate_assumption(self, triangle, value, axis):
if type(value) in (int, float, str):
arr = np.repeat(value, triangle.shape[axis])
if type(value) in (list, tuple, set, np.array):
if type(value) in (list, tuple, set, np.ndarray):
arr = np.array(value)
if type(value) is dict:
arr = np.array([value[a] for a in triangle._get_axis_value(axis)])
Expand All @@ -212,4 +212,4 @@ def _validate_assumption(self, triangle, value, axis):
arr = arr[None, None, None]
if axis == 2:
arr = arr[None, None, :, None]
return arr
return arr

0 comments on commit bf9a630

Please sign in to comment.