ENH: vectorize cov#507
Conversation
mdhaber
left a comment
There was a problem hiding this comment.
Should address the lint failures.
There was a problem hiding this comment.
BTW @lucascolley, while we were at it, I wanted to ask about 1) enforcing use of double precision and 2) squeezing all singleton dimensions at the end.
I've heard it argued that double precision arithmetic is essential for accurate covariance calculations.
Double precision arithmetic is essentially always important for "accurate" calculations. Personally, I've never used float32 intentionally, but I understand it's important, and I don't see why fundamental libraries should make the choice for the user.
As for the "indescriminate squeeze", I can see why you might want to eliminate a dimension if the covariance between two univariate samples were viewed as a reducing operation. But that calculation is not really possible with one-argument cov, and there is no reason to use cov to take the variance of a single univariate sample. So really, I don't see any good use case for 1D input anyway, and for any other dimensionality, it's not good to eliminate singleton batch dimensions.
+1
Agreed. |
|
Does |
|
No - there is something between 2059369 and this commit that is causing failures, but I haven't bisected it yet. |
currently TBC: #324 I'd probably be happy to ship the proposed changes in a 0.10.0, supposing no further movement on that issue. |
Closes gh-502