Replies: 1 comment 1 reply
-
I think this is reasonable: to be able to use the same script on eager One way to do it would be to check for NOT_DASK = object()
for arg in arguments.values():
if type(arg).__module__.split(".")[0] == "dask_awkward":
import dask_awkward
import inspect
function_name = inspect.stack()[1].function
dask_equivalent = getattr(dask_awkward, function_name, None)
if dask_equivalent is None:
raise NotImplementedError(f"dask-awkward function dak.{} does not exist")
else:
return dask_equivalent(**arguments)
else:
return NOT_DASK in the Hmmm. The calling function would have to deal with continuing to normal operation on So some thought is needed to do this nicely, but I agree that it should be done. |
Beta Was this translation helpful? Give feedback.
-
I think it would be very convenient if one could use awkward functions on dask_awkward arrays straight away.
For example, I think it should be very nice to be able to do
I would like code in general to work regardless of whether somebody decides to use dask or standard awkward (without dask).
I'm saying this because this functionality is already there in case of numpy. For example I can do
and also
Of course, reshape and unflatten just serve as examples here and this argument is meant to apply to all common functions awkward and dask_awkward have in common.
Is this something that could be considered to be added?
Beta Was this translation helpful? Give feedback.
All reactions