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

Can't stick strings into a pm.Data container #6245

Open
michaelosthege opened this issue Oct 26, 2022 · 1 comment
Open

Can't stick strings into a pm.Data container #6245

michaelosthege opened this issue Oct 26, 2022 · 1 comment

Comments

@michaelosthege
Copy link
Member

Description of your problem

with pm.Model():
    pm.ConstantData("dnames", ["A", "B"])

gives

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

This is related to the automatic masking/imputation that we tried to remove in #6189.

Versions and main components

  • PyMC/PyMC3 Version: 4.2.2
@ricardoV94
Copy link
Member

ricardoV94 commented Oct 27, 2022

Aesara does not currently support string arrays, so it would fail even without the check for nan.

import aesara.tensor as at
at.as_tensor_variable(["A", "B"])   # Or `aesara.as_symbolic(...)`
# TypeError: Unsupported dtype for TensorType: str32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants