to match others think should this be AssertionError('Axis must be 0 or 1. Got %s' % str(axis)) ?