Skip to content

Conversation

@mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Oct 31, 2025

Closes gh-502

Copy link
Contributor Author

@mdhaber mdhaber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should address the lint failures.

@lucascolley lucascolley self-requested a review October 31, 2025 23:51
if xp.isdtype(m_transpose.dtype, "complex floating"):
m_transpose = xp.conj(m_transpose)
c = m @ m_transpose
c = xp.matmul(m, m_transpose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I didn't know they were supposed to be equivalent until after looking it up. I wasn't sure what @ did for n-D arrays, and matmul is a lot easier to look up

If @ really does work like it should for all backends, it can be left alone. Do you know? If not, safer to use the function because it can be updated by array_api_compat.

fact = 0

m -= avg[:, None]
m_transpose = m.T
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not implemented in all backends yet (at least not CuPy and dask.array on colab) and it can't be added by array_api_compat.

@lucascolley lucascolley added the enhancement New feature or request label Nov 1, 2025
@lucascolley lucascolley added this to the 0.9.1 milestone Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: vectorize cov

2 participants