naplib-python icon indicating copy to clipboard operation
naplib-python copied to clipboard

apply (without concat)

Open gavinmischler opened this issue 3 years ago • 3 comments

Expected Behavior

Add an apply method without concatenating for the array_ops module, because sometimes we don't want across-trial edge effects.

gavinmischler avatar Aug 09 '22 15:08 gavinmischler

Actually is there a use case for this that simple list-comprehension couldn't do?

outstruct['new'] = [function(x) for x in outstruct['old']]

gavinmischler avatar Aug 15 '22 20:08 gavinmischler

I can only think of a use case where the data is too large and you want to modify a field in-place, trial-by-trial. But writing a for loop for that would be just 1-2 lines anyway. So, I would say not adding any new functionality.

menoua avatar Apr 08 '23 19:04 menoua

This is connected to #102, which I also don't think is necessary. It would be easy to implement, but whatever the function is that is being applied, more than likely there's plenty of room for parallelization within that function (per trial) to not necessitate parallelizing over trials.

menoua avatar Apr 08 '23 20:04 menoua