Skip to content

Type mismatch #5

Closed
Closed
@brisvag

Description

@brisvag

Tried to run the "example" in projection_backprojection_cycle.py.

After adjusting it to make it run on some local data, I get the following error:

  File "/home/brisvag/git/teamtomo/torch-fourier-slice/src/torch_fourier_slice/slice_insertion/_insert_central_slices_rfft_3d.py", line 73, in insert_central_slices_rfft_3d
    dft_3d, weights = insert_into_image_3d(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/brisvag/venv/torch-fourier-slice/lib/python3.12/site-packages/torch_image_lerp/linear_interpolation_3d.py", line 140, in insert_into_image_3d
    add_data_at_corner(0, 0, 0)
  File "/home/brisvag/venv/torch-fourier-slice/lib/python3.12/site-packages/torch_image_lerp/linear_interpolation_3d.py", line 137, in add_data_at_corner
    weights.index_put_(indices=(zc, yc, xc), values=w, accumulate=True)
RuntimeError: Index put requires the source and destination dtypes match, got Double for the destination and ComplexDouble for the source.

I'm not sure I get where the problem needs to be fixed.

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