Skip to content

Commit 23cf29d

Browse files
committed
Delay using numpy
1 parent 4eccbd6 commit 23cf29d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

traittypes/traittypes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ class Series(PandasType):
200200
info_text = 'a pandas series'
201201
dtype = None
202202

203-
def __init__(self, default_value=Empty, allow_none=False, dtype=np.float64, **kwargs):
203+
def __init__(self, default_value=Empty, allow_none=False, dtype=None, **kwargs):
204204
if 'klass' not in kwargs and self.klass is None:
205205
import pandas as pd
206206
kwargs['klass'] = pd.Series
207+
if dtype is None:
208+
dtype = np.float64
207209
super(Series, self).__init__(
208210
default_value=default_value, allow_none=allow_none, klass_kwargs={"dtype": dtype}, **kwargs)
209211
self.tag(dtype=dtype)

0 commit comments

Comments
 (0)