broadcastable and ndim are already defined in _tensor_py_operators. You don't need them here, so just remove them.

why do you force dtype to be float32? This cause test failures when I run it, that are different then the errors you shown. Just remote that line too. The float32 restriction should be handled elsewhere. Doing it here for all TensorSharedVariable to be float32.