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

Fix bug when creating an empty Phantom #499

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pvillacorta
Copy link
Collaborator

@pvillacorta pvillacorta commented Oct 17, 2024

This PR solves #498

Phantom(x=[]), Phantom{Float64}(x=[]) or Phantom{Float32}(x=[]) are no longer supported*, since the element type of the Phantom is Inferred from its input arguments, and defining x=[] (eltype Any) is not a good practice in Julia.

Now, it is possible to define an empty Phantom this way:

Phantom() # default eltype is Float64
Phantom{Float64}()
Phantom{Float32}()
Phantom{Int64}()
(...)

*The example in this page is updated too

@pvillacorta
Copy link
Collaborator Author

Buildkite CI is still failing because of JuliaGPU/oneAPI.jl#473

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 this pull request may close these issues.

Troubles defining Float32 or empty phantoms with KomaMRI 0.9
1 participant