Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.imag

numpy.imag(val)[source]

Return the imaginary part of the complex argument.

Parameters:
val:array_like

Input array.

Returns:
out:ndarray or scalar

The imaginary component of the complex argument. Ifval is real,the type ofval is used for the output. Ifval has complexelements, the returned type is float.

Examples

>>>a=np.array([1+2j,3+4j,5+6j])>>>a.imagarray([ 2.,  4.,  6.])>>>a.imag=np.array([8,10,12])>>>aarray([ 1. +8.j,  3.+10.j,  5.+12.j])>>>np.imag(1+1j)1.0

Previous topic

numpy.real

Next topic

numpy.conj

Quick search

  • © Copyright 2008-2018, The SciPy community.
  • Last updated on Jul 24, 2018.
  • Created usingSphinx 1.6.6.

[8]ページ先頭

©2009-2025 Movatter.jp