per page, with , order by , clip by
Results of 1 - 10 of about 10 for indices (0.008 sec.)
itertools --- 効率的なループ用のイテレータ生成関数群 13926
itertools --- 効率的なループ用のイテレータ生成関数群 このモジュールは イテレータ を構築する部品を実装しています。プログラム言語 APL, Haskell, SML からアイデアを得ていますが、 Python に適した形に修正されています。 このモジュールは、高速でメモ ... AC AD BC BD CD # combinations(range(4), 3) → 012 013 023 123 pool = tuple ( iterable ) n = len ( pool ) if r > n : return indices = list ( range ( r )) yield tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indice ... s [ i ] != i + n - r : break else : return indices [ i ] += 1 for j in range ( i + 1 , r ): indices [ j ] = indices [ j - 1 ] + 1 yield tuple ( pool [ i ] for i in indices ) ... inations_with_replacement('ABC', 2) → AA AB AC BB BC CC pool = tuple ( iterable ) n = len ( pool ) if not n and r : return indices = [ 0 ] * r yield tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indices [ i ] != ...
https://man.mtool.work/python/3.14/library/itertools.html
バッファプロトコル (buffer Protocol) 9904
バッファプロトコル (buffer Protocol) Pythonで利用可能ないくつかのオブジェクトは、下層にあるメモリ配列または buffer へのアクセスを提供します。このようなオブジェクトとして、組み込みの bytes や bytearray 、 array.array のようないくつかの拡張型 ... 列として解釈されます。 そうでない場合は、利用者は次のように n 次元配列にアクセスしなければなりません: ptr = ( char * ) buf + indices [ 0 ] * strides [ 0 ] + ... + indices [ n -1 ] * strides [ n -1 ]; item = * (( typeof ( item ) * ) ptr ); 上記のように、 b ... す関数です: void * get_item_pointer ( int ndim , void * buf , Py_ssize_t * strides , Py_ssize_t * suboffsets , Py_ssize_t * indices ) { char * pointer = ( char * ) buf ; int i ; for ( i = 0 ; i < ndim ; i ++ ) { pointer += strides [ i ] * indices [ i ]; ... の場合は 0 を返します。 この関数は常に成功します。 void * PyBuffer_GetPointer ( const Py_buffer * view , const Py_ssize_t * indices ) 次に属します: Stable ABI (バージョン 3.11 より). 与えられた view 内にある indices が指すメモリ領域を取得します。 indices ...
https://man.mtool.work/python/3.14/c-api/buffer.html
termios --- POSIX スタイルの端末制御 9010
termios --- POSIX スタイルの端末制御 このモジュールでは端末 I/O 制御のための POSIX 準拠の関数呼び出しインターフェースを提供します。これら呼び出しのための完全な記述については、 Unix マニュアルページの termios(3) を参照してください。これは PO ... ag, ispeed, ospeed, cc] where cc is a list of the tty special characters (each a string of length 1, except the items with indices VMIN and VTIME , which are integers when these fields are defined). The interpretation of the flags and the speeds as well ... xing in the cc array must be done using the symbolic constants defined in the termios module. termios. VMIN termios. VTIME Indices into the cc array controlling a non-canonical read: the minimum number of characters to read and the timeout in tenths of ...
https://man.mtool.work/python/3.14/library/termios.html
random --- 疑似乱数を生成する 8777
random --- 疑似乱数を生成する ソースコード: Lib/random.py このモジュールでは様々な分布をもつ擬似乱数生成器を実装しています。 整数用に、ある範囲からの一様な選択があります。 シーケンス用には、シーケンスからのランダムな要素の一様な選択、リスト ... n ( iterable , r ): "次からランダムに選択: itertools.combinations(iterable, r)" pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . sample ( range ( n ), r )) return tuple ( pool [ i ] for i in indices ) def random_combination_with_re ... # 結果は set(itertools.combinations_with_replacement(iterable, r)) に含まれる。 pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . choices ( range ( n ), k = r )) return tuple ( pool [ i ] for i in indices ) def random_derangement ( ...
https://man.mtool.work/python/3.14/library/random.html
What's New in Python 2.3 8456
What's New in Python 2.3 著者 : A.M. Kuchling この文書は Python 2.3 の新機能について解説します。Python 2.3 は 2003 年 7 月 29 日にリリースされました。 Python 2.3 の主要なテーマは、2.2 で追加されたいくつかの機能を磨くこと、言語中核に小さいな ... ange ( 10 )[ slice ( 0 , 5 , 2 )] [0, 2, 4] 拡張スライスに対応するシーケンスを簡単に実装できるよう、スライスオブジェクトに indices(length) メソッドが追加されました。 シーケンスの長さを渡すと、 range() にそのまま渡せる (start, stop, step) タプルを返します ... 。 indices() は、省略されたインデックスや範囲外のインデックスを通常のスライスと同じ規則で扱います (この何気ない表現の裏には、ややこし ... ます。 class FakeSeq : ... def calc_item ( self , i ): ... def __getitem__ ( self , item ): if isinstance ( item , slice ): indices = item . indices ( len ( self )) return FakeSeq ([ self . calc_item ( i ) for i in range ( * indices )]) else : return sel ...
https://man.mtool.work/python/3.14/whatsnew/2.3.html
メモリ管理 7883
メモリ管理 概要 Python におけるメモリ管理には、全ての Python オブジェクトとデータ構造が入ったプライベートヒープ (private heap) が必須です。プライベートヒープの管理は、内部的には Python メモリマネージャ (Python memory manager) が確実に行いま ... nction ( p[i:j] means the slice of bytes from *(p+i) inclusive up to *(p+j) exclusive; note that the treatment of negative indices differs from a Python slice): p[-2*S:-S] 元の要求バイト数です。 メモリダンプで読みやすいように、ビッグエンディアンの size_ ...
https://man.mtool.work/python/3.14/c-api/memory.html
string --- 一般的な文字列操作 7883
string --- 一般的な文字列操作 ソースコード: Lib/string/__init__.py 参考 テキストシーケンス型 --- str 文字列メソッド 文字列定数 このモジュールで定義されている定数は以下の通りです: string. ascii_letters 後述の ascii_lowercase と ascii_upperca ... ' . format ( * 'abc' ) # unpacking argument sequence 'c, b, a' >>> ' {0}{1}{0} ' . format ( 'abra' , 'cad' ) # arguments' indices can be repeated 'abracadabra' 名前を使ったアクセス: >>> 'Coordinates: {latitude} , {longitude} ' . format ( latitude = '37 ...
https://man.mtool.work/python/3.14/library/string.html
What's New In Python 3.4 7883
What's New In Python 3.4 著者 : R. David Murray < rdmurray @ bitdance . com > (編集者) この記事では 3.3 と比較した Python 3.4 の新機能を解説します。 Python 3.4 は2014年3月16日にリリースされました。全詳細については 変更履歴 をご覧ください。 ... しで、以前のようなミステリアスな AttributeError ではなく、役に立つ ValueError を投げるようになりました。 ( bpo-9177 ) slice.indices() が巨大な値で OverflowError を起こすことはなくなりました。この修正からの流れで slice.indices() は負の値に対して ValueErro ...
https://man.mtool.work/python/3.14/whatsnew/3.4.html
inspect --- 活動中のオブジェクトを調査する 7776
inspect --- 活動中のオブジェクトを調査する ソースコード: Lib/inspect.py inspect モジュールは、モジュール、クラス、メソッド、関数、トレースバック、フレームオブジェクト、コードオブジェクトなど、実行中のオブジェクトの情報を取得する便利な関数を ... 頭行の番号 co_flags CO_* ビットフラグのマップ。詳細は こちら を参照。 co_lnotab encoded mapping of line numbers to bytecode indices co_freevars (関数のクロージャを介して参照される) 自由変数の名前のタプル co_posonlyargcount 位置専用引数の数 co_kwonlyargco ...
https://man.mtool.work/python/3.14/library/inspect.html
3. データモデル 7776
3. データモデル 3.1. オブジェクト、値、および型 オブジェクト は、Python がデータを抽象化したものです。 Python プログラム内のすべてのデータは、オブジェクトまたはオブジェクト間の関係として表されます。 コードもオブジェクトで表されます。 すべて ... た場合は None となっています。これらの属性は任意の型を持てます。 スライスオブジェクトはメソッドを一つサポートします: slice. indices ( self , length ) このメソッドは単一の整数引数 length を取り、スライスオブジェクトが length 要素のシーケンスに適用されたと ...
https://man.mtool.work/python/3.14/reference/datamodel.html
PREV 1 NEXT