Dividing Series of Decimal objects by Decimal raises AttributeError · Issue #9787 · pandas-dev/pandas (original) (raw)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-f6e1a63d5a28> in <module>()
----> 1 s / Decimal(5)
/home/jck/anaconda/lib/python2.7/site-packages/pandas/core/ops.pyc in wrapper(left, right, name)
530 if hasattr(lvalues, 'values'):
531 lvalues = lvalues.values
--> 532 return left._constructor(wrap_results(na_op(lvalues, rvalues)),
533 index=left.index, name=left.name,
534 dtype=dtype)
/home/jck/anaconda/lib/python2.7/site-packages/pandas/core/ops.pyc in na_op(x, y)
483 result, changed = com._maybe_upcast_putmask(result, ~mask, np.nan)
484
--> 485 result = com._fill_zeros(result, x, y, name, fill_zeros)
486 return result
487
/home/jck/anaconda/lib/python2.7/site-packages/pandas/core/common.pyc in _fill_zeros(result, x, y, name, fill)
1407 y = np.array(y)
1408
-> 1409 if is_integer_dtype(y):
1410
1411 if (y == 0).any():
/home/jck/anaconda/lib/python2.7/site-packages/pandas/core/common.pyc in is_integer_dtype(arr_or_dtype)
2448
2449 def is_integer_dtype(arr_or_dtype):
-> 2450 tipo = _get_dtype_type(arr_or_dtype)
2451 return (issubclass(tipo, np.integer) and
2452 not issubclass(tipo, (np.datetime64, np.timedelta64)))
/home/jck/anaconda/lib/python2.7/site-packages/pandas/core/common.pyc in _get_dtype_type(arr_or_dtype)
2439 elif isinstance(arr_or_dtype, CategoricalDtype):
2440 return CategoricalDtypeType
-> 2441 return arr_or_dtype.dtype.type
2442
2443
AttributeError: 'Decimal' object has no attribute 'dtype'
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-24-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.16.0
nose: 1.3.4
Cython: 0.21
numpy: 1.9.2
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.2.0
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.2
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.0
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.5.7
lxml: 3.4.0
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 0.9.7
pymysql: None
psycopg2: None