Open
Description
It would be nice to able to apply relaxed cuts to awkward arrays. Consider the following code snippet:
x_np = np.arange(0, 10, 0.1)
y_relaxed = relaxed.cut(x_np, 5, slope=1) # this works
y_manual = 0.5*np.tanh((x_np-5)/2)+0.5 # same result as line above
x_ak = ak.from_numpy(x_np)
y_relaxed = relaxed.cut(x_ak, 5, slope=1) # this fails
y_manual = 0.5*np.tanh((x_ak-5)/2)+0.5 # this still works
It fails with
TypeError: exp requires ndarray or scalar arguments, got <class 'awkward.highlevel.Array'> at position 0.
Metadata
Metadata
Assignees
Labels
No labels