Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Add support for converting numpy integers. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions monetdblite/monetize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
import decimal
import sys

try:
import numpy
except ImportError:
raise Exception('MonetDBLite requires numpy but import of numpy failed')

PY3 = sys.version_info[0] >= 3

from monetdblite.exceptions import ProgrammingError
Expand Down Expand Up @@ -72,6 +77,7 @@ def monet_unicode(data):
(str, monet_escape),
(bytes, monet_bytes),
(int, str),
(numpy.integer, str),
(complex, str),
(float, str),
(decimal.Decimal, str),
Expand Down