Numpy 的 imag
属性返回一个包含数组虚部的 Numpy 数组。
例子
假设我们有以下包含复数的数组:
x = np.array([5+2j, 3+4j])
x
array([5.+2.j, 3.+4.j])
要获取真实零件:
x.imag
array([2., 4.])
相关用法
- Python image转binary用法及代码示例
- Python imaplib.IMAP4.search用法及代码示例
- Python imaplib.IMAP4用法及代码示例
- Python imaplib.IMAP4.store用法及代码示例
- Python import__用法及代码示例
- Python importlib.reload用法及代码示例
- Python imp.reload用法及代码示例
- Python Django import_string用法及代码示例
- Python OpenCV imdecode()用法及代码示例
- Python importlib.util.LazyLoader.factory用法及代码示例
- Python NumPy itemset方法用法及代码示例
- Python isinstance方法用法及代码示例
- Python BeautifulSoup insert方法用法及代码示例
- Python itertools.takewhile用法及代码示例
- Python id()用法及代码示例
- Python ipaddress.collapse_addresses用法及代码示例
- Python ipaddress.IPv4Address.reverse_pointer用法及代码示例
- Python io.text_encoding用法及代码示例
- Python string isidentifier()用法及代码示例
- Python numpy irr用法及代码示例
- Python ipaddress.IPv4Address.__format__用法及代码示例
- Python calendar isleap()用法及代码示例
- Python math isclose()用法及代码示例
- Python NumPy isalnum方法用法及代码示例
- Python NumPy isnat方法用法及代码示例
注:本文由纯净天空筛选整理自Isshin Inada大神的英文原创作品 NumPy | imag property。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。