Skip to content

DistArray._process_return_value() refactoring #451

@kwmsmith

Description

@kwmsmith

I think _process_return_value() is unecessary, and I'd like to see it removed, and __getitem__ refactored in the process.

It seems like there are three separate cases (currently) for __getitem__, and each one can be made into its own internal method on DistArray. This will also remove process_return_value.

  • Case 1: self.distribution.has_precise_index and return_proxy
  • Case 2: self.distribution.has_precise_index and not return_proxy
  • Case 3: not self.distribution.has_precise_index

Each case should call its own internal method, and define its own local function to call. Further, in Case 1, the resulting array's distribution and dtype is known ahead of time, so the call to from_localarrays() should use them and save a roundtrip.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions