From cb66af0fee6b6aeebf791a2595b920a868c8379c Mon Sep 17 00:00:00 2001 From: RTsien Date: Mon, 15 Dec 2014 21:57:55 +0800 Subject: [PATCH] fix a bug with numpy.shape() of the numpy v1.9 np.shape([1,2,3]) returns (3L,) --- pybayes/pdfs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybayes/pdfs.py b/pybayes/pdfs.py index c752911..3935c4e 100644 --- a/pybayes/pdfs.py +++ b/pybayes/pdfs.py @@ -42,8 +42,8 @@ def __init__(self, dimension, name = None): if name is not None and not isinstance(name, str): raise TypeError("name must be either None or a string") self.name = name - if not isinstance(dimension, int): - raise TypeError("dimension must be integer (int)") + if not isinstance(dimension, long): + raise TypeError("dimension must be integer (long)") if dimension < 1: raise ValueError("dimension must be non-zero positive") self.dimension = dimension