From 997b10747fb2b68a0c4385f92f87c0968fd20a89 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Mon, 29 Jul 2019 06:17:40 -0400 Subject: [PATCH] fixes #170 --- awkward/array/base.py | 2 +- awkward/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awkward/array/base.py b/awkward/array/base.py index 02ec22c0..25ed026d 100644 --- a/awkward/array/base.py +++ b/awkward/array/base.py @@ -378,7 +378,7 @@ def _util_toarray(cls, value, defaultdtype, passthrough=None): else: try: return cls.numpy.frombuffer(value, dtype=getattr(value, "dtype", defaultdtype)).reshape(getattr(value, "shape", -1)) - except AttributeError: + except (AttributeError, TypeError): if len(value) == 0: return cls.numpy.array(value, dtype=defaultdtype, copy=False) else: diff --git a/awkward/version.py b/awkward/version.py index 4795c476..4ef09a25 100644 --- a/awkward/version.py +++ b/awkward/version.py @@ -4,7 +4,7 @@ import re -__version__ = "0.12.3" +__version__ = "0.12.4" version = __version__ version_info = tuple(re.split(r"[-\.]", __version__))