Sparse array glm fit in pymc3 very long with NUTS

I’m doing the following but am getting a dimension mismatch error now…

### TRYING A SPARSE MATRIX IMPLEMENTATION
#https://discourse.pymc.io/t/sparse-array-glm-fit-in-pymc3-very-long-with-nuts/6063/6
print('[LOGGER]: STARTING PYMC3')
start = time.time()

#shape of betas
n_betas = matrix.get_shape()[1]
target_array = np.array(target_list)
target_array = target_array.astype(float)
print(target_array)

np_mtx = scipy.sparse.csc_matrix.toarray(matrix)
theano_mtx = theano.sparse.csc_from_dense(np_mtx)
print(theano_mtx)
del np_mtx

print('[LOGGER]: SHAPE OF BETAS:{}'.format(n_betas))
print('[LOGGER]: SHAPE OF MATRIX:{}'.format(theano.tensor.shape(theano_mtx)))
print('[LOGGER]: SHAPE OF TARGET:{}'.format(len(target_array)))

theano_mtx.tag.test_value = scipy.sparse.csc_matrix(target_array)

with pm.Model() as py_lr2:
    intercept = pm.Normal('c', 0, 100)
    betas = pm.Normal('betas', 0, 10, shape=(n_betas, 1))   #EVENTUALLY THIS WILL TAKE THE FORM OF THE PRIORS FROM THE META MODEL
    sd = pm.HalfNormal('sigma', 5.)
    mu = theano.sparse.basic.dot(theano_mtx, betas) + intercept
    obs = pm.Normal('y', mu=mu, sigma=sd, observed=target_array)
    trace = sample(500, cores=2,progressbar=True) # draw 500 posterior samples using NUTS sampling, initialize with advi

plt.figure(figsize=(7, 7))
traceplot(trace)
plt.tight_layout()
plt.show()

end = time.time()
print("[LOGGER]: FINISHED PYMC3...total run took {} minutes to run".format((end-start)/60))