liebke/incanter — pull request #71 by nybbles (2012-03-18 23:27:12+00:00)
Title: Fix for sample-multinomial with size 1 resulting in ISeq from Double exception

- Evaluating (stats/sample-multinomial 1) causes the exception
java.lang.IllegalArgumentException: Don't know how to create ISeq from:
java.lang.Double, because sample-uniform returns a sequence if called with a
size > 1 and a double otherwise.
- This happens because sample-uniform returns a double if called with size=1
and a seq otherwise. The fix is to make sample-uniform always return a seq,
even if it just has one element.
- There is only one place where sample-uniform is called with size=1 and this
commit updates the call.
- There are two places where sample-uniform is called with size passed in as a
parameter. One call is in a place in sample where it is always true that
size>1. The other call is in sample-multinomial and this commit fixes the
problem there.