Specifying the dtype in np.ones(4, dtype=np.float32) does not fix this problem.
import pymc3 as pm
import numpy as np
str_dtype = "float32"
with pm.Model() as op_model:
mat = pm.Dirichlet('A', np.ones(4, dtype=np.float32), shape=(4, 4),
dtype=str_dtype)