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

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate 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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

利用 Python 进行数据分析(原书第2版)

利用 Python 进行数据分析(原书第2版)

Wes McKinney

Publisher Resources

ISBN: 9789864766819