Skip to content

[PYTHON] Error when running unittest example #99

@aolbrech

Description

@aolbrech

I am using Python 3.6.9 and have installed gpuNUFFT using pip install gpuNUFFT. Yet when I run the unit test in the Python folder using python -m unittest as suggested in the README, I get an error on the second line:

        operator = self.get_nufft_op(self.coil_maps)
        x = operator.op(np.reshape(self.img.T, self.img.size))

The error message I am getting is:

======================================================================
ERROR: test_multicoil_with_sense (test_nufftOp.TestgpuNUFFT)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/c/Users/annik.olbrechts/Documents/Circle/FRF_Project/gpuNUFFT/python/test_nufftOp.py", line 93, in test_multicoil_with_sense
    x = operator.op(np.reshape(self.img.T, self.img.size))
TypeError: op(): incompatible function arguments. The following argument types are supported:
    1. (self: gpuNUFFT.NUFFTOp, arg0: numpy.ndarray[numpy.complex64], arg1: bool) -> numpy.ndarray[numpy.complex64]

Invoked with: <gpuNUFFT.NUFFTOp object at 0x7f86ce073c70>, array([0.+0.j, 0.+0.j, 0.+0.j, ..., 0.+0.j, 0.+0.j, 0.+0.j],
      dtype=complex64)

Anyone has any experience running the Python module? I am trying to replace Matlab code by Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions