Conversation
| @pytest.mark.parametrize("loc_scale", [ | ||
| (), | ||
| (1,), | ||
| (1, 1), |
There was a problem hiding this comment.
This is a mistake; reverting.
| loc = kwargs.get('loc', args.pop() if len(args) > 0 else 0) | ||
| args = deque(args) | ||
| loc = kwargs.get('loc', args.popleft() if len(args) > 0 else 0) | ||
| scale = kwargs.get('scale', args.popleft() if len(args) > 0 else 1) |
There was a problem hiding this comment.
hmm, I thought that you wanted to popright here to take care of shape parameters, which appear at the beginning of some rv_continous distributions?
There was a problem hiding this comment.
I don't think we should have any shape params for the logpdf method, but I think we probably do need that for the rvs method though size should still appear after loc and scale if I remember correctly. Let me check and fix that.
There was a problem hiding this comment.
The issue that this resolves is that norm.logpdf(x, 1.) should assign 1. to loc and not to scale (which should take its default value of 1).
There was a problem hiding this comment.
Got it! I mean to use scale = kwargs.get('scale', args.pop() if len(args) > 1 else 1) here, but it seems still not be able resolve the problem when shape parameters are involved (for non-frozen distributions such as beta). So let's merge this first and think about how to deal with shape parameters later.
| [tool:pytest] | ||
| filterwarnings = error | ||
| ignore:numpy.ufunc size changed,:RuntimeWarning | ||
| once:No GPU found:UserWarning |
This won't enable travis until the repo is made public, but it should resolve pytest errors. Also fixed an error with one of our distribution tests.