Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional function-based API #277

Open
JasperVanDenBosch opened this issue Nov 8, 2022 · 1 comment
Open

Optional function-based API #277

JasperVanDenBosch opened this issue Nov 8, 2022 · 1 comment

Comments

@JasperVanDenBosch
Copy link
Contributor

This is the idea to have an additional way to program with rsatoolbox where the user can pass data arrays directly into functions, as discussed previously alongside #160

from rsatoolbox.func import calc_rdm
rdm_vectors = calc_rdm(data)

We currently have no urgency in implementing this but this issue is here to keep the idea around.

@JasperVanDenBosch
Copy link
Contributor Author

Today we discussed this as there is some renewed interest.

Two ways to implement this

  1. inside-out: internal code should work on arrays/tensors, and the current object-based API wraps and unwraps these. The functional API then becomes trivial
  2. outside-in: The functional API wraps the existing object-based API.

Two considerations for choosing between these

a) complexity, amount of work involved in refactoring
b) performance. Will 2) have a lot of overhead?

We should learn something about b) during our work on searchlight-style pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant