diff --git a/awkward/array/chunked.py b/awkward/array/chunked.py index 32966651..89588b6c 100644 --- a/awkward/array/chunked.py +++ b/awkward/array/chunked.py @@ -291,13 +291,6 @@ def __getitem__(self, where): self._valid() if self._util_isstringslice(where): - if isinstance(where, awkward.util.string): - if not self.type.hascolumn(where): - raise ValueError("no column named {0}".format(repr(where))) - else: - for x in where: - if not self.type.hascolumn(x): - raise ValueError("no column named {0}".format(repr(x))) chunks = [] counts = [] for chunk in self._chunks: @@ -482,7 +475,7 @@ def __setitem__(self, where, what): if isinstance(what, ChunkedArray) and self._aligned(what): for i, (mine, theirs) in enumerate(zip(self._chunks, what._chunks)): mine[where] = theirs - self._types[i] = mine.type + self._types[i] = mine.type.to else: raise ValueError("only ChunkedArrays with the same chunk sizes can be assigned to columns of a ChunkedArray")