return list of arrays, each array represents a different m mode
503565
def _reshape_n_vecs(self):
        """"""

        lst = []
        sl = slice(None, None, None)
        lst.append(self.__getitem__((sl, 0)))
        for m in xrange(1, self.mmax + 1):
            lst.append(self.__getitem__((sl, -m)))
            lst.append(self.__getitem__((sl, m)))
        return lst
1036110
def array(self):
        
        return np.geomspace(self.start, self.stop, self.num, self.endpoint)
121388
def rectToArray(self, swapWH = False):
        
        if swapWH == False:
            return [self.x, self.y, self.x + self.width, self.y + self.height]
        else:
            return [self.x, self.y, self.x + self.height, self.y + self.width]
155385
def to_list(self):
        
        return [self.i, self.Ω, self.e, self.ω, self.M, self.n]
892162
def bytes_array(self):
        ''''''
        assert len(self.dimensions) == 2, \
            '{}: cannot get value as bytes array!'.format(self.name)
        l, n = self.dimensions
        return [self.bytes[i*l:(i+1)*l] for i in range(n)]
1287793
def _mat2dict(obj): 
    '''
    
    '''
    import scipy.io as spio
    import numpy as np

    if isinstance(obj, dict):
        out = {}
        for key in obj:
            if isinstance(obj[key], spio.matlab.mio5_params.mat_struct):
                if key in ['conns', 'stims', 'synMechs']:
                    out[key] = [_mat2dict(obj[key])]  # convert to 1-element list
                else:
                    out[key] = _mat2dict(obj[key])
            elif isinstance(obj[key], np.ndarray):
                out[key] = _mat2dict(obj[key])
            else:
                out[key] = obj[key]

    elif isinstance(obj, spio.matlab.mio5_params.mat_struct):
        out = {}
        for key in obj._fieldnames:
            val = obj.__dict__[key]
            if isinstance(val, spio.matlab.mio5_params.mat_struct):
                if key in ['conns', 'stims', 'synMechs']:
                    out[key] = [_mat2dict(val)]  # convert to 1-element list
                else:
                    out[key] = _mat2dict(val)
            elif isinstance(val, np.ndarray):
                out[key] = _mat2dict(val)
            else:
                out[key] = val

    elif isinstance(obj, np.ndarray):
        out = []
        for item in obj:
            if isinstance(item, spio.matlab.mio5_params.mat_struct) or isinstance(item, np.ndarray):
                out.append(_mat2dict(item))
            else:
                out.append(item)

    else:
        out = obj

    return out
1214964
def _array_2d_repr(self):
        """"""

        sc_array = np.zeros((self.nmax + 1, 2 * self.mmax + 1),
                            dtype=np.complex128)

        lst = self._reshape_n_vecs()
        sc_array[0:self.nmax + 1, self.mmax] = lst[0]
        for m in xrange(1, self.mmax + 1):
            sc_array[m:self.nmax + 1, self.mmax - m] = lst[2 * m - 1]
            sc_array[m:self.nmax + 1, self.mmax + m] = lst[2 * m]

        return sc_array
486529
def all_names(self):
        """"""
        return [
            _get_variable_names(arr) if not isinstance(arr, ArrayList) else
            arr.all_names
            for arr in self]
777966
def rels(self):
        """"""
        r = []
        for i in self.metadata:
            r = r + i[REL]
        return []
762924
def get_map_matrix(inputfile):
    
    matrix = read_input_file(inputfile)
    output = []
    for row in matrix:
        if row[3]:
            output.append([row[3], row[1], row[2]])
    return output
133131
def array(self):
        
        return np.arange(self.start, self.stop, self.step)
1276032
def _ensure_array_list(arrays):
    """"""
    # Note: the isinstance test is needed below so that instances of FieldArray
    # are not converted to numpy arrays
    return [numpy.array(arr, ndmin=1) if not isinstance(arr, numpy.ndarray)
            else arr for arr in arrays]
454549
def print_arrays(data, cols)
      formatted_list = cli.list(data, :uneven_columns_across, cols)
      cli.say(formatted_list)
    end
781424
def getMaskIndices(mask):
  """"""
  return [
    list(mask).index(True), len(mask) - 1 - list(mask)[::-1].index(True)
  ]
1260715
def list_():
    '''
    
    '''
    ret = {}
    for line in (__salt__['cmd.run_stdout']
                    (['mdadm', '--detail', '--scan'],
                     python_shell=False).splitlines()):
        if ' ' not in line:
            continue
        comps = line.split()
        device = comps[1]
        ret[device] = {"device": device}
        for comp in comps[2:]:
            key = comp.split('=')[0].lower()
            value = comp.split('=')[1]
            ret[device][key] = value
    return ret
1369321
def _as_in_context(data, ctx):
    """"""
    if isinstance(data, nd.NDArray):
        return data.as_in_context(ctx)
    elif isinstance(data, (list, tuple)):
        return [_as_in_context(d, ctx) for d in data]
    return data
557344
def _get_zoom_mat(sw:float, sh:float, c:float, r:float)->AffineMatrix:
    ""
    return [[sw, 0,  c],
            [0, sh,  r],
            [0,  0, 1.]]