def asarray(array):
 if (not isinstance(array, Array)):
  name = ('asarray-' + tokenize(array))
  if isinstance(getattr(array, 'shape', None), Iterable):
   array = np.asarray(array)
  array = from_array(array, chunks=array.shape, name=name)
 return array

def asarray ( array ) : if ( not isinstance ( array , Array ) ) : name = ( 'asarray-' + tokenize ( array ) ) if isinstance ( getattr ( array , 'shape' , None ) , Iterable ) : array = np . asarray ( array ) array = from_array ( array , chunks = array . shape , name = name ) return array
coerce argument into a dask array .