per page, with , order by , clip by
Results of 1 - 10 of about 51 for complex (0.007 sec.)
複素数オブジェクト 15631
複素数オブジェクト Python's complex number objects are implemented as two distinct types when viewed from the C API: one is the Python object exposed to Python programs, and the other is a C structure which represents the actual complex num ... as results do so by value rather than dereferencing them through pointers. This is consistent throughout the API. type Py_complex The C structure which corresponds to the value portion of a Python complex number object. Most of the functions for dealin ... g with complex number objects use structures of this type as input or output values, as appropriate. double real double imag 構造体は次の ... ように定義されています。 typedef struct { double real ; double imag ; } Py_complex ; Py_complex _Py_c_sum ( Py_complex left , Py_complex right ) 二つの複素数の和を C の Py_complex 型で返します。 Py_complex ...
https://man.mtool.work/python/3.14/c-api/complex.html
numbers --- 数の抽象基底クラス 12933
numbers --- 数の抽象基底クラス ソースコード: Lib/numbers.py numbers モジュール ( PEP 3141 ) は、下位になるほど多くの演算を定義する、数値の 抽象基底クラス の階層を定義しています。 このモジュールで定義する型は、どれもインスタンス化を目的とした ... x が、種類は何であれ、数であるということだけチェックしたい場合、 isinstance(x, Number) が使えます。 数値塔 class numbers. Complex この型のサブクラスは複素数を表し、組み込みの complex 型を受け付ける演算を含みます。それらは: complex および bool への変換、 ... njugate ( ) 抽象メソッド。 複素共役を返します。 たとえば、 (1+3j).conjugate() == (1-3j) です。 class numbers. Real Real は Complex に実数の演算を追加します。 簡潔に言うとそれらは: float への変換, math.trunc() , round() , math.floor() , math.ceil() , div ... mod() , // , % , < , <= , > および >= です。 Real はまた complex() , real , imag および conjugate() のデフォルトを提供します。 class numbers. Rational Real をサブタイプ化し numerator と d ...
https://man.mtool.work/python/3.14/library/numbers.html
cmath --- 複素数用の数学関数 9247
cmath --- 複素数用の数学関数 このモジュールは、複素数を扱う数学関数へのアクセスを提供しています。 このモジュール中の関数は整数、浮動小数点数または複素数を引数にとります。 また、 __complex__() または __float__() どちらかのメソッドを提供してい ... します。 注釈 分枝切断を持つ関数では、切断そのものの上で関数をどう定義するかが問題になります。 Kahan の論文 "Branch cuts for complex elementary functions" と、C99 以降の C 規格の附属書 G に従い、ゼロの符号で分枝切断のどちら側かを区別します。 実軸の一部に沿 ... 位相です。 polar(z) は (abs(z), phase(z)) と同じです。 cmath. rect ( r , phi ) 極座標が r と phi である複素数 z を返します。 complex(r * math.cos(phi), r * math.sin(phi)) と同じです。 指数関数と対数関数 cmath. exp ( z ) 自然対数の底 e の z 乗を返します。 ... 数の正の無限大です。 float('inf') と等価です。 Added in version 3.6. cmath. infj 実部がゼロ、虚部が正の無限大の複素数です。 complex(0.0, float('inf')) と等価です。 Added in version 3.6. cmath. nan 浮動小数点数の非数 (NaN) です。 float('nan') と同じです。 ...
https://man.mtool.work/python/3.14/library/cmath.html
組み込み関数 8542
組み込み関数 Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。 組み込み関数 A abs() aiter() all() anext() any() ascii() B bin() bool() breakpoint() bytearray() bytes( ... ) C callable() chr() classmethod() compile() complex() D delattr() dict() dir() divmod() E enumerate() eval() exec() F filter() float() format() frozenset() G getattr() global ... の関数は False を返します。それ以外の場合は True を返します。 bool クラスは int クラスの派生クラスです ( 数値型 int, float, complex を参照してください)。このクラスからさらに派生することはできません。このクラスのインスタンスは False と True のみです ( ブー ... 3.12 で変更: source にヌルバイトが含まれている場合、 ValueError ではなく SyntaxError が送出されるようになりました。 class complex ( number = 0 , / ) class complex ( string , / ) class complex ( real = 0 , imag = 0 ) 単一の文字列や数値を複素数に変換する ...
https://man.mtool.work/python/3.14/builtins/functions.html
将来のバージョンで削除予定 8227
将来のバージョンで削除予定 以下の API は将来削除されますが、現時点では削除時期は決まっていません。 argparse : 引数グループの入れ子と、相互排他的なグループの入れ子は非推奨です。 add_argument_group() に、ドキュメント化されていないキーワード引 ... ドが float の厳密なサブクラスのインスタンスを返すことへの対応:今後は float 自体のインスタンスを返すことが必須になります。 __complex__() メソッドが complex の厳密なサブクラスのインスタンスを返すことへの対応:今後は complex 自体のインスタンスを返すことが必須 ... になります。 complex() コンストラクターの real 引数や imag 引数に複素数を渡すことは非推奨になりました。 複素数は単独の位置引数としてのみ渡してく ... ださい。 他のマニュアルの関連ページ PHP migration56.constants PHP migration73.constants PHP changelog.mysql_xdevapi Linux JM complex(7) PHP control-structures.if PHP xmlrpc_set_type() ...
https://man.mtool.work/python/3.14/deprecations/pending-removal-in-future.html
difflib --- 差分の計算の補助 8227
difflib --- 差分の計算の補助 ソースコード: Lib/difflib.py このモジュールはシーケンスを比較するクラスと関数を提供します。 その多くは、テキスト行のシーケンス (文字列のリストや ファイルオブジェクト など) を比較し、相違点を報告する 差分 (diff) ... ): >>> text1 = ''' 1. Beautiful is better than ugly. ... 2. Explicit is better than implicit. ... 3. Simple is better than complex. ... 4. Complex is better than complicated. ... ''' . splitlines ( keepends = True ) >>> len ( text1 ) 4 >>> text1 [ 0 ][ ... - 1 ] '\n' >>> text2 = ''' 1. Beautiful is better than ugly. ... 3. Simple is better than complex. ... 4. Complicated is better than complex. ... 5. Flat is better than nested. ... ''' . splitlines ( keepends = True ) 次 ... result ) [' 1. Beautiful is better than ugly.\n', '- 2. Explicit is better than implicit.\n', '- 3. Simple is better than complex.\n', '+ 3. Simple is better than complex.\n', '? ++\n', '- 4. Complex is better than complicated.\n', '? ^ ---- ^\n', '+ 4 ...
https://man.mtool.work/python/3.14/library/difflib.html
ctypes --- Python 用の外部関数ライブラリ 8123
ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために ... 拠した複素数演算 (附属書 G) をサポートする場合、以下の複素数型を利用できます: ctypes の型 C の型 Python の型 _type_ c_float_complex float complex complex 'F' c_double_complex double complex complex 'D' c_longdouble_complex long double complex complex 'G' ... c_ushort ( - 3 ) c_ushort(65533) >>> 数値型のコンストラクタは、 __bool__() 、 __index__() ( int の場合)、 __float__() 、 __complex__() を使って入力を変換します。 したがって、 c_bool は真偽値を持つ任意のオブジェクトを受け付けます。 >>> empty_list = [] >> ... _float C float データ型を表します。コンストラクタはオプションの浮動小数点数初期化子を受け取ります。 class ctypes. c_double_complex 利用可能な場合に、C の double complex データ型を表します。 コンストラクタは省略可能な complex の初期値を受け付けます。 Add ...
https://man.mtool.work/python/3.14/library/ctypes.html
json --- JSON エンコーダーとデコーダー 8063
json --- JSON エンコーダーとデコーダー ソースコード: Lib/json/__init__.py JSON (JavaScript Object Notation) は、 RFC 7159 ( RFC 4627 を obsolete) と ECMA-404 によって定義された軽量のデータ交換用のフォーマットです。 JavaScript のオブジェクト ... オブジェクトのエンコーディング方法をカスタマイズする: >>> import json >>> def custom_json ( obj ): ... if isinstance ( obj , complex ): ... return { '__complex__' : True , 'real' : obj . real , 'imag' : obj . imag } ... raise TypeError ( f 'Cannot seriali ... ze object of { type ( obj ) } ' ) ... >>> json . dumps ( 1 + 2 j , default = custom_json ) '{"__complex__": true, "real": 1.0, "imag": 2.0}' JSON のデコーディング: >>> import json >>> json . loads ( '["foo", {"bar":["baz", nul ... > json . load ( io ) ['streaming API'] JSON オブジェクトのデコーディング方法をカスタマイズする: >>> import json >>> def as_complex ( dct ): ... if '__complex__' in dct : ... return complex ( dct [ 'real' ], dct [ 'imag' ]) ... return dct ... >>> json . ...
https://man.mtool.work/python/3.14/library/json.html
組み込み型 8003
組み込み型 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。 コレクションクラスには、ミュータブルなものがあります。コレクシ ... 先度を持つ演算子がさらに 2 つあり、 iterable または __contains__() を実装した型でサポートされています。 数値型 int , float , complex 数値型には 3 種類あります: 整数 、 浮動小数点数 、 複素数 です。さらに、ブール型は整数のサブタイプです。整数には精度の制限 ... 、それに整数や浮動小数点数を加えることにより実部と虚部を持つ複素数を得ることができます。 コンストラクタ int() 、 float() 、 complex() で、特定の型の数を生成できます。 Python は異なる型を混在させた算術演算を完全にサポートしています。 二項算術演算子のオペラ ... 換の必要はありません。 複素数と実数をオペランドとする演算は、通常の数学の式で定義されます。 例えば、次のようになります。 x + complex ( u , v ) = complex ( x + u , v ) x * complex ( u , v ) = complex ( x * u , x * v ) 異なる型の数値を比較すると、それぞれの ...
https://man.mtool.work/python/3.14/builtins/stdtypes.html
引数の解釈と値の構築 7853
引数の解釈と値の構築 これらの関数は、独自の拡張関数やメソッドを作成するときに便利です。 追加の情報や例は Python インタプリタの拡張と埋め込み を参照してください。 最初に説明する 3 つの関数、 PyArg_ParseTuple() , PyArg_ParseTupleAndKeywords() ... Z 、 Z# を削除しました。 数 これらの形式は、Python の数値や単一の文字を C の数値として表すためのものです。 int 、 float 、 complex を必要とする形式では、対応する特殊メソッド __index__() 、 __float__() 、 __complex__() で Python オブジェクトを必要な型に変 ... hon の浮動小数点数を C の float に変換します。 d ( float ) [double] Python の浮動小数点数を C の double に変換します。 D ( complex ) [Py_complex] Python の複素数型を、 C の Py_complex 構造体に変換します。 その他のオブジェクト O (object) [PyObject *] Pyt ... の double を Python の浮動小数点数に変換します。 f ( float ) [float] C の float を Python の浮動小数点数に変換します。 D ( complex ) [Py_complex *] C の Py_complex 構造体を Python の複素数型に変換します。 O (object) [PyObject *] Python オブジェクトをその ...
https://man.mtool.work/python/3.14/c-api/arg.html
PREV 1 2 3 4 5 6 NEXT