Uh oh!
There was an error while loading. Please reload this page.
Add complex number support to linalg.slogdet - #567
Conversation
rgommers
commented
Dec 14, 2022
I think that that's mostly a terminology thing? The implementations are consistent: >>>x=np.array([[0.1+0.9j, 0.5-0.5j], [1, 2j]])
>>>np.linalg.slogdet(x)
((-0.9566738804288585+0.29116161578269606j), 0.877201841342143)
>>>torch.linalg.slogdet(torch.as_tensor(x))
torch.return_types.linalg_slogdet(
sign=tensor(-0.9567+0.2912j, dtype=torch.complex128),
logabsdet=tensor(0.8772, dtype=torch.float64))If there's something to clarify or improve in the PyTorch wording in the |
lezcano
commented
Dec 15, 2022
I agree that the term angle is not correct. The quantity that's returned in PyTorch is indeed the sign, and the rest of the docs and the implementation are consistent with this. I'll fix that in the PyTorch docs soon. |
This issue was raised in data-apis/array-api#567 [ghstack-poisoned]
This issue was raised in data-apis/array-api#567 ghstack-source-id: e9cd318 Pull Request resolved: #91129
This issue was raised in data-apis/array-api#567 Pull Request resolved: #91129 Approved by: https://github.com/kit1980
This issue was raised in data-apis/array-api#567 Pull Request resolved: pytorch#91129 Approved by: https://github.com/kit1980
This PR
linalg.slogdet.sign#556. In contrast to itssignfunction, NumPy uses the definitionsignarray be the same data type as the input array andlogabsdetbe unconditionally real-valued.