Skip to content

Remove duplication of code across process_I and process_I_vector #242

Description

@sangeetabhatia03

The two functions share underlying logic with the following differences:

  • process_I_vector supports incidence2 whereas process_I does not
  • process_I_vector does not transfer local[1] to imported if local[1] > 0.

Finally process_I_vector will flatten inputs to a vector.
If not transferring local[1] to imported if local[1] > 0 is a choice, it should be flagged in the documentation.
On the other hand, if it is an oversight we should definitely fix it.

But even if it is the case that not treating local[1] to imported if local[1] > 0 is a choice, we could easily get rid of duplicated code and checks by adding a flag to process_I and having process_I_vector simply flatten the output of process_I

Thoughts @annecori and @rebeccanash ?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions