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

Commit

Permalink
remove debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Aug 24, 2018
1 parent d20b335 commit 8dfb644
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions awkward/array/jagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,6 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
else:
assert False

# print()
# print("**************************************")
# for i in range(len(inputs)):
# print(inputs[i])
# print(type(inputs[i]), isinstance(inputs[i], awkward.util.numpy.ndarray), isinstance(inputs[i], awkward.array.base.AwkwardArray))
# print("**************************************")

for i in range(len(inputs)):
if isinstance(inputs[i], (awkward.util.numpy.ndarray, awkward.array.base.AwkwardArray)) and not isinstance(inputs[i], JaggedArray):
data = awkward.util.toarray(inputs[i], inputs[i].dtype, (awkward.util.numpy.ndarray, awkward.array.base.AwkwardArray))
Expand Down Expand Up @@ -648,33 +641,8 @@ def recurse(x):

content = recurse(data)

# if isinstance(data, awkward.array.objects.ObjectArray):
# content = awkward.util.numpy.empty(len(parents), dtype=data.content.dtype)
# content[good] = data.content[parents[good]]
# content = data.copy(content=content)

# elif isinstance(data, awkward.array.table.Table):
# content = data.empty_like()
# for n in data.columns:
# x = data[n]
# content[n] = awkward.util.numpy.empty(len(parents), dtype=x.dtype)
# content[n][good] = x[parents[good]]

# else:
# content = awkward.util.numpy.empty(len(parents), dtype=data.dtype)
# if len(data.shape) == 0:
# content[good] = data
# else:
# content[good] = data[parents[good]]

inputs[i] = self.copy(starts=starts, stops=stops, content=content)

# print()
# print("**************************************")
# for i in range(len(inputs)):
# print(type(inputs[i]), inputs[i])
# print("**************************************")

for i in range(len(inputs)):
if isinstance(inputs[i], JaggedArray):
if good is None:
Expand All @@ -684,10 +652,6 @@ def recurse(x):

result = getattr(ufunc, method)(*inputs, **kwargs)

# print(result)
# print("**************************************")
# print()

if isinstance(result, tuple):
return tuple(self.copy(starts=starts, stops=stops, content=x) for x in result)
elif method == "at":
Expand Down

0 comments on commit 8dfb644

Please sign in to comment.