Replies: 1 comment
-
Hey @yetinam, Good point. I am not sure if the performance hit would be significant, but it might be best to opt-in to this behavior using a keyword in the The output might be a little trickier. We wouldn't want to iterate through any iterable looking for convertible objects in the case that a long array is the output. I guess the thing to do is only iterate through tuples which would be the most common multi-value return type. Let's keep this open for now. I think the first order task is to improve testing of the conversions. As the package develops the best path forward may become more clear. |
Beta Was this translation helpful? Give feedback.
-
Thanks @d-chambers for writing this really nice piece of code. I have a small suggestion for the API.
If I correctly understood your code, currently, the adapter assumes that the first argument is a DAS object and only converts this argument. Similarly for the output. However, some functions (think cross-correlations) might take or return multiple DAS arrays. How about iterating over
args
andkwargs
instead and converting everything eligible? We could do the same for the output.Counter argument: then we might start arguing as well what to do about more complex inputs. Lists of DAS, dicts of DAS, ... . But maybe we can reasonably say these cases are out of scope. I think multiple DAS arrays might be useful (and common) though.
Beta Was this translation helpful? Give feedback.
All reactions