What are the "-" and "j" of "-9.96587885e+03j" with the number 1.54991569e+03-9.96587885e+03j?

Asked 1 months ago, Updated 1 months ago, 5 views

When I ran scipy.ftpack.ft(y), one of the returned values had the following numbers:


I understand that "e+03" means the third power of 10, but


What are '-' and 'j' in ?

python mathematics

2022-09-30 11:18

1 Answers

This is a complex number, in the form of a+bj, where j is an imaginary unit. 1.54991569e+03-9.96587885e+03j is a complex number with a real part of 1.54991569e+03 and an empty part of -9.96587885e+03.

The imaginary units used in high school mathematics in Japan are often written in i, but in some fields, j is used. Python is supposed to treat literal in the form of a+bj as complex numbers.


If you add 'j' or 'J' to the numeric literal, you can give an imaginary number (a complex number with zero real parts) and add an integer or floating point number to it to obtain a complex number with real and imaginary parts.

The scipy.ftpack.ft document also states that this function returns ndarray as a complex number element.


Returns z:complex ndarray

2022-09-30 11:18

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.