enthought/distarray — pull request #245 by bgrant (2014-03-20 18:50:03+00:00)
Title: Fix LocalArray copy, astype, and view

These methods called `LocalArray.__init__` internally, which didn't propagate information about the more complex dist_types (that need to be initialized with full `dim_data` structures).

This PR fixes `copy` and `astype` by calling `from_dim_data` instead of `__init__`. `view` is fixed for the simple case and raises `NotImplemented` if a new `dtype` is provided.

I also added tests, simple docstrings, and a TODO comment (in `view`).