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

Diffvar type check introduced in v9.63 causes error with complex diffvars #3406

Closed
david-pl opened this issue Feb 21, 2025 · 1 comment · Fixed by #3415
Closed

Diffvar type check introduced in v9.63 causes error with complex diffvars #3406

david-pl opened this issue Feb 21, 2025 · 1 comment · Fixed by #3415
Assignees

Comments

@david-pl
Copy link

The recently introduced type check here

!(symtype(diffvar) === Real || eltype(symtype(diffvar)) === Real) &&
throws an error for previously working examples / tests in QuantumCumulants.jl.

Tests error with, e.g.

  ArgumentError: Differential variable var"⟨a′*a⟩"(t) has type Complex. Differential variables should not be concretely typed.

The check is too restrictive IMHO, since it's not strictly necessary for things to be <: Real here. Would it be possible to loosen the constraints? Would it be enough to check whether the type is abstract and <: Number?

Also, if you want to be picky: the check doesn't actually do what the error message says. Checking for symtype(x) === Real isn't actually checking for concretely typed variables.

@ChrisRackauckas
Copy link
Member

<: Number should be fine.

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

Successfully merging a pull request may close this issue.

3 participants