Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for setting "bytes" as datatype #242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 3 additions & 3 deletions datashape/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions datashape/type_symbol_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_),
Expand Down