bins problem from SciPy mailing list
putting things to bins