Skip to content

Commit

Permalink
api
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Oct 2, 2018
1 parent 85fc5d8 commit 2183f7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/tests/extension/decimal_array/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .array import DecimalArray, DecimalDtype


__all__ = ['DecimalArray', 'DecimalDtype']
__all__ = ['DecimalArray', 'DecimalDtype', 'to_decimal', 'make_data']
4 changes: 4 additions & 0 deletions pandas/tests/extension/decimal_array/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,9 @@ def _concat_same_type(cls, to_concat):
return cls(np.concatenate([x._data for x in to_concat]))


def to_decimal(values, context=None):
return DecimalArray([decimal.Decimal(x) for x in values], context=context)


DecimalArray._add_arithmetic_ops()
DecimalArray._add_comparison_ops()

0 comments on commit 2183f7b

Please sign in to comment.