welly
welly copied to clipboard
Unary operator doesn't work
E.g. this doesn't work:
w = Well.from_las('data/P-129_out.LAS')
gr = w.data['GR']
# This works:
gr.plot_2d(cmap='viridis', curve=True, lw=0.3, edgecolor='k')
# This doesn't:
(200 - gr).plot_2d(cmap='viridis', curve=True, lw=0.3, edgecolor='k')
Should be easy enough to fix with __neg__()
and __pos__()
I think.
Do you mean here that (200-gr)
is not working properly?
curve = well.data['GR']
curve2 = 200-curve
arr1 = curve.df.to_numpy()
arr3 = arr1-200
arr2 = curve2.df.to_numpy()
all(arr2 == arr3)
Out[11]: True