Repository navigation
Conversation
There was a problem hiding this comment.
space around operators like = (except **)
the main part of #2734 needs to handle scalar nobs
simple would be to add
if nobs.size == 1:
nobs = nobs * np.ones(len(count))
(I haven't checked if vectorized would work.)
There was a problem hiding this comment.
@josef-pkt Sorry i forgot to put space around = , i will keep that in mind .
What if the nobs.size is not equal to 1 , and the also the shape of counts and nobs are different . So should it raise a ValueError ??
Also i was getting error while trying to vectorize it .
So should i make a PR by adding if condition when nobs.size=1 and raising error when shape is different of count and nobs ??
There was a problem hiding this comment.
You can add this to this PR. Yes, if nobs is not scalar and not the same shape as count, then we should raise a ValueError.
You could also check the unit tests to see how much of this is covered.
full vectorization will require more work, and checking to see how it is supposed to be interpreted, and would be too much for this PR
Correctly handle difference cases Add tests for related cases Add error for incorrect usage closes statsmodels#2969 closes statsmodels#2779
fix #2734