enthought/distarray — pull request #232 by kwmsmith (2014-03-17 21:33:58+00:00)
Title: `grid_shape` generalized to handle non-distributed dims.

Removes `distdims` and `ndistdim` properties from `LocalArray`.

Testsuite updated and passing.

The idea is that, whereas before, `grid_shape` only cared about the distributed dimensions, now `grid_shape` has a slot for *every* dimension, whether or not it is distributed.

Constraints that should now always hold for `LocalArray`s:

* `len(self.grid_shape) == self.ndim`
* if `self.dist[i] == 'n'`, then `self.grid_shape[i] == 1` for all `i` in `range(self.ndim)`.

As I think about it, we should probably add logic to test for consistency between `grid_shape`, `dist`, etc. on initialization.