scikit-hep / awkward-0.x

Manipulate arrays of complex data structures as easily as Numpy.
BSD 3-Clause "New" or "Revised" License
215 stars 39 forks source link

JaggedArray.cross raises TypeError when called on empty #212

Closed jrueb closed 4 years ago

jrueb commented 4 years ago

Please consider the following code

a = awkward.JaggedArray.fromiter([])
b = awkward.JaggedArray.fromiter([])
c = a.cross(b)

It raises a TypeError. I would expect it to return an empty JaggedArray. a.argcross(b) works fine. I guess this is another corner case like for example issue #190.

jpivarski commented 4 years ago

You're right—it is a corner case, fixed in PR #213. It's not a related bug, though. I'll be glad when the new framework is ready and we don't have to play whack-a-mole anymore. :)