Currently DistArray.from_localarrays() takes a key and a context and does a round-trip communication to get the dim_data information. In nearly all circumstances, this extra round-trip is unnecessary.
DistArray.from_localarrays() should be refactored to take a key, a context, and an optional dim_data (default None). If dim_data is provided, then the call to _make_mdmap_from_local_dimdata should be skipped (https://github.com/enthought/distarray/blob/master/distarray/client.py#L119), and Distribution.from_dim_data should be called directly.
Where possible, the places where DistArray.from_localarrays() is called should be refactored to get the key and the dim_data from the LocalArrays on the engines and call from_localarrays() with the dim_data sequence. See the _create_local, _from_dim_data, load_dnpy, load_npy, load_hdf5, and from_function methods in the Context class.
Currently
DistArray.from_localarrays()takes akeyand acontextand does a round-trip communication to get the dim_data information. In nearly all circumstances, this extra round-trip is unnecessary.DistArray.from_localarrays()should be refactored to take akey, acontext, and an optionaldim_data(defaultNone). Ifdim_datais provided, then the call to_make_mdmap_from_local_dimdatashould be skipped (https://github.com/enthought/distarray/blob/master/distarray/client.py#L119), andDistribution.from_dim_datashould be called directly.Where possible, the places where
DistArray.from_localarrays()is called should be refactored to get thekeyand thedim_datafrom theLocalArrays on the engines and callfrom_localarrays()with thedim_datasequence. See the_create_local,_from_dim_data,load_dnpy,load_npy,load_hdf5, andfrom_functionmethods in theContextclass.