Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #75 from scikit-hep/issue-losing-numbaness
Browse files Browse the repository at this point in the history
fixed missing Numbaness on __getitem__[string]
  • Loading branch information
jpivarski authored Feb 1, 2019
2 parents 01baec9 + 3e63155 commit 557aa0c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion awkward/array/chunked.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def __getitem__(self, where):
if len(chunks) == 0:
return self.copy(chunks=chunks, counts=counts)
else:
return awkward.array.objects.Methods.maybemixin(type(chunks[0]), ChunkedArray)(chunks, counts=counts)
return awkward.array.objects.Methods.maybemixin(type(chunks[0]), self.ChunkedArray)(chunks, counts=counts)

if isinstance(where, tuple) and len(where) == 0:
return self
Expand Down
4 changes: 2 additions & 2 deletions awkward/array/indexed.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), IndexedArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.IndexedArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down Expand Up @@ -411,7 +411,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), SparseArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.SparseArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down
2 changes: 1 addition & 1 deletion awkward/array/jagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), JaggedArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.JaggedArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down
6 changes: 3 additions & 3 deletions awkward/array/masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), MaskedArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.MaskedArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down Expand Up @@ -501,7 +501,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), BitMaskedArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.BitMaskedArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down Expand Up @@ -637,7 +637,7 @@ def __getitem__(self, where):

if self._util_isstringslice(where):
content = self._content[where]
cls = awkward.array.objects.Methods.maybemixin(type(content), IndexedMaskedArray)
cls = awkward.array.objects.Methods.maybemixin(type(content), self.IndexedMaskedArray)
out = cls.__new__(cls)
out.__dict__.update(self.__dict__)
out._content = content
Expand Down
2 changes: 1 addition & 1 deletion awkward/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import re

__version__ = "0.8.1"
__version__ = "0.8.2"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 557aa0c

Please sign in to comment.