Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cholesky returns truncated integer outputs for integer inputs #1071

Open
ricardoV94 opened this issue Nov 7, 2024 · 0 comments
Open

Cholesky returns truncated integer outputs for integer inputs #1071

ricardoV94 opened this issue Nov 7, 2024 · 0 comments
Labels
beginner friendly bug Something isn't working linalg Linear algebra Op implementation

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Nov 7, 2024

Description

import pytensor.tensor as pt
import numpy as np
import scipy as sp

x = np.array([[2]])
print(
    pt.linalg.cholesky(x).eval(),
    np.linalg.cholesky(x),
    sp.linalg.cholesky(x),
) # [[1]] [[1.41421356]] [[1.41421356]]

Probably make_node is suggesting the output is just input.type() (that is the same shape and dtype as the input). May be worth it to investigate if this is more widespread in the linalg module

@ricardoV94 ricardoV94 added bug Something isn't working Op implementation linalg Linear algebra labels Nov 7, 2024
@ricardoV94 ricardoV94 changed the title Cholesky returns integer for integer inputs Cholesky returns truncated integer outputs for integer inputs Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner friendly bug Something isn't working linalg Linear algebra Op implementation
Projects
None yet
Development

No branches or pull requests

1 participant