pymc-devs/pymc — pull request #359 by mpjdem (2013-10-11 09:02:50+00:00)
Title: BinaryMetropolis always skipping to Metropolis

BinaryMetropolis.step() redirects to Metropolis.step() if isscalar(self.stochastic.value) returns False.

However numpy.isscalar() also returns False for ndarrays of rank 0. Since stochastics like Bernoulli or Categorical automatically convert their value to an ndarray, the BinaryMetropolis step algorithm is never used.

I use numpy.rank() instead.