enthought/distarray — pull request #77 by bgrant (2013-10-30 00:02:56+00:00)
Title: Change the API for creating LocalArrays

Change the API for creating `LocalArray`s such that,

in `base.py`:
* `__init__` now takes `dimdata` and optionally a `buf` and a `dtype`. This will allow users to specify more complex disttypes.
* `_allocate` is now integrated into `BaseLocalArray.__init__`

in `denselocalarray.py`:
* `from_dimdata` is a classmethod representing the most general way to create a `LocalArray` (using the `dimdata` data structure from the Distributed Array Protocol) and optionally a `buf` and a `dtype`.
* `__init__` is a simplified method that translates the old-style parameters into a `dimdata` under the hood. Users will only be able to specify "regular" block and cyclic disttypes with this method.
* `from_distarray` is another classmethod that takes an object with a `__distarray__` method and calls `from_dimdata` properly underneath.

Also do some miscellaneous cleanup and fill out some docstrings.

While writing this PR I've discovered that some of the comments in my last commit were incorrect---this PR text is correct though.