diff --git a/datashape/discovery.py b/datashape/discovery.py index 602cffa..e116033 100644 --- a/datashape/discovery.py +++ b/datashape/discovery.py @@ -11,10 +11,10 @@ import numpy as np from .dispatch import dispatch -from .coretypes import (int32, int64, float64, bool_, complex128, datetime_, +from .coretypes import (int32, int64, float64, bool_, bytes_, complex128, datetime_, Option, var, from_numpy, Tuple, null, Record, string, Null, DataShape, real, date_, time_, - Unit, timedelta_, TimeDelta, object_, String) + Unit, timedelta_, TimeDelta, object_) from .predicates import isdimension, isrecord from .py2help import _strtypes, _inttypes, MappingProxyType, OrderedDict from .internal_utils import _toposort, groupby @@ -81,7 +81,7 @@ def discover(i): if sys.version_info[0] == 3: @dispatch(bytes) def discover(b): - return String('A') + return bytes_ @dispatch(npinttypes) diff --git a/datashape/type_symbol_table.py b/datashape/type_symbol_table.py index 1032100..98f9981 100644 --- a/datashape/type_symbol_table.py +++ b/datashape/type_symbol_table.py @@ -72,6 +72,7 @@ def _ellipsis(name): ('real', ct.float64), ('complex', ct.complex_float64), ('string', ct.string), + ('bytes', ct.bytes_), ('json', ct.json), ('date', ct.date_), ('time', ct.time_),