Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced content levelIntermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
498
|
15 章 數值處理
線上文件包括了實用的訣竅(
https://docs.python.org/2.7/library/decimal.
html#recipes
)用於貨幣值的格式化、某些三角學函式,以及常見問題
Frequently Asked QuestionsFAQ)。
gmpy2 模組
gmpy2
模組是以 C 編寫的一個擴充功能(extension),它支援 GMPMPFR
MPC 程式庫,以擴充和加速 Python 的能力,進行多精度(multiple-
precision)的算術(即算術中所涉及的數字之精確度只受限於可用的記憶
體量)。
gmpy2
的主要開發分支支援具有執行緒安全性的情境(thread-safe
contexts)。你可以從 PyPI
https://pypi.python.org/pypi/gmpy2
)下載並安裝
gmpy2
陣列處理
你能以串列(涵蓋於前面的「串列」)表示陣列(arrays),也能以
array
標準程式庫模組(涵蓋於前面的「array 模組」)來表示。你能以迴圈、
索引或切片動作、串列概括式(list comprehensions)、迭代器、產生器、
genexps(全都涵蓋於第 3 章)、內建的
map
reduce
filter
(全都涵蓋
於前面的「內建函式」),以及像是
itertools
(涵蓋於前面的「itertools
組」)的標準程式庫模組來操作陣列。如果你只需要輕量化的一維(one-
dimensional)陣列,使用
array ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9789864766819