Skip to content

0.16.2 cannot sample datetime64 coords #255

@daniel-s-tccc

Description

@daniel-s-tccc

np.datetime64 cause problems for sampling.

coords = {"date": [np.datetime64("2025-01-01")]}
with pm.Model(coords=coords) as model:
    pm.Normal('a',mu=0,sigma=1,dims="date")
compile_model = nutpie.compile_pymc_model(model)
nutpie.sample(compiled_model)

raises

RuntimeError: Coordinate value has incorrect type
Caused by: RuntimeError: Could not convert to Value. Unsupported type.

The problem doesn't occur on nutpie version 0.15.2. It doesn't occur if you use str for dates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions