def makeCd_from_vec(vecCd,nDims,n_neurons):
    """ convert between vector and matrix forms of C and d"""
    C = vecCd[:nDims*n_neurons].reshape(nDims,n_neurons).T
    d = vecCd[nDims*n_neurons:]
    return C,d