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

Deprecation warning and shutdown #66

Closed
9B8DY6 opened this issue Jul 4, 2022 · 3 comments
Closed

Deprecation warning and shutdown #66

9B8DY6 opened this issue Jul 4, 2022 · 3 comments

Comments

@9B8DY6
Copy link

9B8DY6 commented Jul 4, 2022

When I use self.nufft_ob = tkbn.KbNufft(im_size=im_size, #grid_size=(256,256), ).to(self.dev),
I got warning and shutdown

DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

but there is no problem with tkbn.ToepNufft()

and I want to know how to inverse NuFFT with toepliz.

Thank you

@9B8DY6 9B8DY6 changed the title Deprecation waring and shutdown Deprecation warning and shutdown Jul 4, 2022
@kylematoba
Copy link

self.nufft_ob = tkbn.KbNufft(im_size=im_size, #grid_size=(256,256), ).to(self.dev), is not syntatically correct python?

Not clear what you mean by "shutdown", but the warning is just a warning -- you can ignore, suppress, or fix (by replacing instances of np.complex with complex) without changing the computation.

@mmuckley
Copy link
Owner

mmuckley commented Jul 5, 2022

As far as I can tell this is not used anywhere in the core package (but it is used in some examples).

https://github.com/mmuckley/torchkbnufft/search?q=np.complex

We should probably update the examples, but in your case @9B8DY6 it seems your self.dev is np.complex.

@9B8DY6
Copy link
Author

9B8DY6 commented Jul 6, 2022

I solved this problem with filterwarning!

@9B8DY6 9B8DY6 closed this as completed Jul 6, 2022
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

No branches or pull requests

3 participants