@@ -213,7 +213,7 @@ msgstr "位元組函式"
213
213
214
214
#: ../../library/random.rst:112
215
215
msgid "Generate *n* random bytes."
216
- msgstr "產生 *n*隨機位元組 。"
216
+ msgstr "產生 *n*個隨機位元組 。"
217
217
218
218
#: ../../library/random.rst:114
219
219
msgid ""
@@ -224,15 +224,15 @@ msgstr ""
224
224
225
225
#: ../../library/random.rst:121
226
226
msgid "Functions for integers"
227
- msgstr "整數函式 "
227
+ msgstr "回傳整數的函式 "
228
228
229
229
#: ../../library/random.rst:126
230
230
msgid ""
231
231
"Return a randomly selected element from ``range(start, stop, step)``. This "
232
232
"is equivalent to ``choice(range(start, stop, step))``, but doesn't actually "
233
233
"build a range object."
234
234
msgstr ""
235
- "從 ``range(start, stop, step)``中所回傳隨機選擇的元素 。這等效於 "
235
+ "從 ``range(start, stop, step)``中回傳一個隨機選擇的元素 。這等效於 "
236
236
"``choice(range(start, stop, step))``,但實際上並沒有構建範圍物件。"
237
237
238
238
#: ../../library/random.rst:130
@@ -268,15 +268,15 @@ msgid ""
268
268
"``randrange('10')`` will be changed from :exc:`ValueError` to :exc:"
269
269
"`TypeError`."
270
270
msgstr ""
271
- "對於非整數值,例如 ``randrange(10.5)`` 或 ``randrange('10')``,引發的異常將 "
271
+ "對於非整數值,例如 ``randrange(10.5)`` 或 ``randrange('10')``,引發的例外將 "
272
272
"從 :exc:`ValueError` 改為 :exc:`TypeError`。"
273
273
274
274
#: ../../library/random.rst:150
275
275
msgid ""
276
276
"Return a random integer *N* such that ``a <= N <= b``. Alias for "
277
277
"``randrange(a, b+1)``."
278
278
msgstr ""
279
- "返回一個隨機整數 *N*,使得 ``a <= N <= b``。``randrange(a, b+1)`` 的別名。"
279
+ "回傳一個隨機整數 *N*,使得 ``a <= N <= b``。為 ``randrange(a, b+1)`` 的別名。"
280
280
281
281
#: ../../library/random.rst:155
282
282
msgid ""
@@ -285,8 +285,8 @@ msgid ""
285
285
"also provide it as an optional part of the API. When available, :meth:"
286
286
"`getrandbits` enables :meth:`randrange` to handle arbitrarily large ranges."
287
287
msgstr ""
288
- "回傳一個具有 *k*隨機位的非負 Python 整數。此方法隨 MersenneTwister與其他一 "
289
- "些產生器一起提供,也可能將其作為 API的可選部分提供 。如果可用,\\ :meth:"
288
+ "回傳一個具有 *k*個隨機位元的非負 Python 整數。此方法會隨 MersenneTwister產生器一 "
289
+ "起提供,一些其他的產生器也可能將其作為 API的可選部分 。如果可用,\\ :meth:"
290
290
"`getrandbits` 使 :meth:`randrange` 能夠處理任意大的範圍。"
291
291
292
292
#: ../../library/random.rst:161
@@ -310,7 +310,7 @@ msgid ""
310
310
"Return a *k* sized list of elements chosen from the *population* with "
311
311
"replacement. If the *population* is empty, raises :exc:`IndexError`."
312
312
msgstr ""
313
- "回傳從 *population*中選擇的大小為 *k*的元素清單進行替換 。如果 *population* "
313
+ "回傳從 *population*中重置取樣出的一個大小為 *k*的元素 list 。如果 *population* "
314
314
"為空,則引發 :exc:`IndexError`。"
315
315
316
316
#: ../../library/random.rst:178
@@ -337,7 +337,7 @@ msgid ""
337
337
"specify both *weights* and *cum_weights*."
338
338
msgstr ""
339
339
"如果既未指定 *weights* 也未指定 *cum_weights*,則以相等的機率進行選擇。如果提"
340
- "供了加權序列,則該序列的長度必須與 *population* 序列的長度相同。 它是一個 :"
340
+ "供了加權序列,則該序列的長度必須與 *population* 序列的長度相同。它是一個 :"
341
341
"exc:`TypeError` 來指定 *weights* 和 *cum_weights*。"
342
342
343
343
#: ../../library/random.rst:192
@@ -348,9 +348,9 @@ msgid ""
348
348
"to be non-negative and finite. A :exc:`ValueError` is raised if all weights "
349
349
"are zero."
350
350
msgstr ""
351
- "*weights* 或 *cum_weights*可以使用任何 :func:`random` 所回傳的 :class:"
352
- "`float` 值(包括整數、float 和分數,但不包括小數)互操作 (interoperates) 的數"
353
- "值類型。權重假定為非負數和有限權重 。如果所有權重均為零,則引發 :exc:"
351
+ "*weights* 或 *cum_weights*可以使用任何與 :func:`random` 所回傳的 :class:"
352
+ "`float` 值(包括整數、float 和分數,但不包括小數)交互操作 (interoperates) 的數"
353
+ "值類型。權重假定為非負數和有限的 。如果所有權重均為零,則引發 :exc:"
354
354
"`ValueError`。"
355
355
356
356
#: ../../library/random.rst:198
@@ -373,14 +373,14 @@ msgstr "如果所有權重均為零,則引發 :exc:`ValueError`。"
373
373
374
374
#: ../../library/random.rst:213
375
375
msgid "Shuffle the sequence *x* in place."
376
- msgstr "將序列 *x* 隨機打亂位置。"
376
+ msgstr "將序列 *x*原地 (in place) 隨機打亂位置。"
377
377
378
378
#: ../../library/random.rst:215
379
379
msgid ""
380
380
"The optional argument *random* is a 0-argument function returning a random "
381
381
"float in [0.0, 1.0); by default, this is the function :func:`.random`."
382
382
msgstr ""
383
- "選擇性引數 *random* 是一個 0 引數函式,預設回傳一個在 [0.0, 1.0)的隨機 "
383
+ "選擇性引數 *random* 是一個 0 引數函式,回傳一個在 [0.0, 1.0)之間的隨機 "
384
384
"float;預設情況下,這是函式 :func:`.random`。"
385
385
386
386
#: ../../library/random.rst:218
@@ -399,8 +399,8 @@ msgid ""
399
399
"generated. For example, a sequence of length 2080 is the largest that can "
400
400
"fit within the period of the Mersenne Twister random number generator."
401
401
msgstr ""
402
- "請注意,即使對於較小的 ``len(x)``,*x*的排列總數也會快速成長到大於大多數隨機 "
403
- "數產生器的週期。這意味著長序列的大多數排列永遠無法產生 。例如,長度為 2080 的"
402
+ "請注意,即使對於較小的 ``len(x)``,*x*的置換總數也會快速成長到大於大多數隨機 "
403
+ "數產生器的週期。這意味著長序列的大多數置換永遠無法產生 。例如,長度為 2080 的"
404
404
"序列是 Mersenne Twister 隨機數產生器週期內可以容納的最大序列。"
405
405
406
406
#: ../../library/random.rst:228
@@ -412,7 +412,7 @@ msgid ""
412
412
"Return a *k* length list of unique elements chosen from the population "
413
413
"sequence or set. Used for random sampling without replacement."
414
414
msgstr ""
415
- "回傳從母體序列或集合中選擇的唯一元素的 *k*長度清單。用於隨機取樣,無需替換 。"
415
+ "回傳從母體序列或集合中選擇出的一個包含獨特元素、長度為 *k*的 list。用於不重置的隨機取樣 。"
416
416
417
417
#: ../../library/random.rst:236
418
418
msgid ""
@@ -422,7 +422,7 @@ msgid ""
422
422
"winners (the sample) to be partitioned into grand prize and second place "
423
423
"winners (the subslices)."
424
424
msgstr ""
425
- "回傳包含母體元素的新清單,同時保持原始母體不變。 產生的清單按選擇順序排列,因"
425
+ "回傳包含母體元素的新清單,同時保持原始母體不變。產生的清單按選擇順序排列,因"
426
426
"此所有子切片也會是有效的隨機樣本。這允許抽獎獲獎者(樣本)分為大獎和第二名獲"
427
427
"獎者(子切片)。"
428
428
@@ -472,8 +472,8 @@ msgid ""
472
472
"`list` or :class:`tuple`, preferably in a deterministic order so that the "
473
473
"sample is reproducible."
474
474
msgstr ""
475
- "將來,*母體 * 必須是一個序列。不再支援 :class:`set` 的實例。必須先將集合轉換"
476
- "為 :class:`list` 或 :class:`tuple`,最好是按確定性順序,以便樣本是可復現的 。"
475
+ "將來,*population * 必須是一個序列。不再支援 :class:`set` 的實例。必須先將集合轉換"
476
+ "為 :class:`list` 或 :class:`tuple`,最好是按確定性順序,以便取樣是可復現的 。"
477
477
478
478
#: ../../library/random.rst:270
479
479
msgid "Real-valued distributions"
@@ -486,7 +486,7 @@ msgid ""
486
486
"distribution's equation, as used in common mathematical practice; most of "
487
487
"these equations can be found in any statistics text."
488
488
msgstr ""
489
- "以下函式產生特定的實數分佈。函式參數以分佈方程中的對應變量命名 ,如常見的數學"
489
+ "以下函式產生特定的實數分佈。函式參數以分佈方程中的對應變數命名 ,如常見的數學"
490
490
"實踐所示;這些方程式中的大多數都可以在任意統計文本中找到。"
491
491
492
492
#: ../../library/random.rst:280
@@ -498,8 +498,8 @@ msgid ""
498
498
"Return a random floating point number *N* such that ``a <= N <= b`` for ``a "
499
499
"<= b`` and ``b <= N <= a`` for ``b < a``."
500
500
msgstr ""
501
- "回傳一個隨機浮點數 *N*,使得 ``a <=N <= b`` 為 ``a <= b``、``b <= N <= a`` "
502
- "為 ``b < a``。"
501
+ "回傳一個隨機浮點數 *N*,當 ``a <= b``時確保 N 為 ``a <=N <= b`` 、``b < a`` "
502
+ "時確保 N 為 ``b <= N <= a``。"
503
503
504
504
#: ../../library/random.rst:288
505
505
msgid ""
@@ -545,12 +545,15 @@ msgid ""
545
545
"Gamma distribution. (*Not* the gamma function!) Conditions on the "
546
546
"parameters are ``alpha > 0`` and ``beta > 0``."
547
547
msgstr ""
548
- "Gamma(伽瑪)分佈。(*不是* Gamma 函式!) 參數的條件為 ``alpha > 0`` 和 "
548
+ "Gamma(伽瑪)分佈。(*不是* Gamma 函式!)參數的條件為 ``alpha > 0`` 和 "
549
549
"``beta > 0``。"
550
550
551
551
#: ../../library/random.rst:320
552
552
msgid "The probability distribution function is::"
553
- msgstr "Probability distribution function(機率密度函數是)::"
553
+ msgstr ""
554
+ "Probability distribution function(機率密度函數)是:\n"
555
+ "\n"
556
+ "::"
554
557
555
558
#: ../../library/random.rst:329
556
559
msgid ""
@@ -569,7 +572,7 @@ msgid ""
569
572
"random number generator. 2) Put locks around all calls. 3) Use the slower, "
570
573
"but thread-safe :func:`normalvariate` function instead."
571
574
msgstr ""
572
- "多執行緒須注意:當兩個線程同時呼叫此函式時 ,它們可能會收到相同的傳回值。 這可"
575
+ "多執行緒須注意:當兩個執行緒同時呼叫此函式時 ,它們可能會收到相同的傳回值。這可"
573
576
"以透過三種方式避免。1)讓每個執行緒使用隨機數產生器的不同實例。2)在所有呼叫"
574
577
"周圍加鎖。3)使用較慢但執行緒安全的 :func:`normalvariate` 函數代替。"
575
578
@@ -580,8 +583,8 @@ msgid ""
580
583
"deviation *sigma*. *mu* can have any value, and *sigma* must be greater "
581
584
"than zero."
582
585
msgstr ""
583
- "對數常態分佈。如果你取此分佈的自然對數,您將獲得一個具有平均數 *mu* 和標準差 "
584
- "*sigma* 的常態分佈。*mu*可以有任何值 ,並且 *sigma* 必須大於零。"
586
+ "對數常態分佈。如果你取此分佈的自然對數,你將獲得一個具有平均數 *mu* 和標準差 "
587
+ "*sigma* 的常態分佈。*mu*可以為任何值 ,並且 *sigma* 必須大於零。"
585
588
586
589
#: ../../library/random.rst:351
587
590
msgid ""
@@ -619,7 +622,7 @@ msgstr "替代產生器"
619
622
msgid ""
620
623
"Class that implements the default pseudo-random number generator used by "
621
624
"the :mod:`random` module."
622
- msgstr "實現 :mod:`random` 模組使用的預設偽隨機數產生器的Class 。"
625
+ msgstr "實現 :mod:`random` 模組使用的預設偽隨機數產生器的class 。"
623
626
624
627
#: ../../library/random.rst:381
625
628
msgid ""
@@ -641,7 +644,7 @@ msgid ""
641
644
msgstr ""
642
645
"使用 :func:`os.urandom` 函式從作業系統提供的來源產生隨機數的 Class。並非在所"
643
646
"有系統上都可用。不依賴於軟體狀態,並且序列不可復現。因此 :meth:`seed` 方法沒"
644
- "有效果,而被忽略 。如果呼叫 :meth:`getstate` 和 :meth:`setstate` 方法會引發 :"
647
+ "有效果且被忽略 。如果呼叫 :meth:`getstate` 和 :meth:`setstate` 方法會引發 :"
645
648
"exc:`NotImplementedError`。"
646
649
647
650
#: ../../library/random.rst:397
@@ -655,7 +658,7 @@ msgid ""
655
658
"should be reproducible from run to run as long as multiple threads are not "
656
659
"running."
657
660
msgstr ""
658
- "有時,能夠重現偽隨機數產生器給出的序列很有用。只要多線程未運行 ,透過重複使用"
661
+ "有時,能夠重現偽隨機數產生器給出的序列很有用。只要多執行緒未運行 ,透過重複使用"
659
662
"種子值,同一序列就應該可以被復現。"
660
663
661
664
#: ../../library/random.rst:403
@@ -670,7 +673,7 @@ msgstr ""
670
673
msgid ""
671
674
"If a new seeding method is added, then a backward compatible seeder will be "
672
675
"offered."
673
- msgstr "如果增加了新的播種方法 ,則將提供向後相容的播種器。"
676
+ msgstr "如果增加了新的 seed 設定函數 ,則將提供向後相容的播種器 (seeder) 。"
674
677
675
678
#: ../../library/random.rst:409
676
679
msgid ""
@@ -705,7 +708,7 @@ msgid ""
705
708
"a confidence interval for the mean of a sample::"
706
709
msgstr ""
707
710
"`統計 bootstrapping(自助法) <https://en.wikipedia.org/wiki/"
708
- "Bootstrapping_(statistics)>`_ 的範例,使用替換重新取樣來估計樣本平均數的信賴 "
711
+ "Bootstrapping_(statistics)>`_\\ 的範例,使用有重置的重新取樣來估計樣本平均數的信賴 "
709
712
"區間 ::"
710
713
711
714
#: ../../library/random.rst:486
@@ -716,13 +719,17 @@ msgid ""
716
719
"observed difference between the effects of a drug versus a placebo::"
717
720
msgstr ""
718
721
"`重新取樣排列測試 <https://en.wikipedia.org/wiki/"
719
- "Resampling_(statistics)#Permutation_tests>`_ 的範例,來確定觀察到的藥物與安慰"
720
- "劑之間差異的統計學意義或 `p值 <https://en.wikipedia.org/wiki/P-value>`_ ::"
722
+ "Resampling_(statistics)#Permutation_tests>`_\\ 的範例,來確定觀察到的藥物與安慰"
723
+ "劑之間差異的統計學意義或 `p 值 <https://en.wikipedia.org/wiki/P-value>`_ \n"
724
+ "\n"
725
+ "::"
721
726
722
727
#: ../../library/random.rst:513
723
728
msgid ""
724
729
"Simulation of arrival times and service deliveries for a multiserver queue::"
725
- msgstr "模擬多伺服器序列的到達時間與服務交付 ::"
730
+ msgstr "模擬多伺服器佇列 (queue) 的到達時間與服務交付\n"
731
+ "\n"
732
+ "::"
726
733
727
734
#: ../../library/random.rst:542
728
735
msgid ""
@@ -731,7 +738,7 @@ msgid ""
731
738
"profile/295/>`_ on statistical analysis using just a few fundamental "
732
739
"concepts including simulation, sampling, shuffling, and cross-validation."
733
740
msgstr ""
734
- "`Statistics for Hackers <https://www.youtube.com/watch?v=Iq9DzN6mvYA>`_由 "
741
+ "`Statistics for Hackers <https://www.youtube.com/watch?v=Iq9DzN6mvYA>`_是由 "
735
742
"`Jake Vanderplas <https://us.pycon.org/2016/speaker/profile/295/>`_ 製作的教"
736
743
"學影片,僅使用幾個基本概念(包括模擬、取樣、洗牌、交叉驗證)進行統計分析。"
737
744
@@ -744,8 +751,8 @@ msgid ""
744
751
"choice, triangular, and randrange)."
745
752
msgstr ""
746
753
"`Economics Simulation <http://nbviewer.jupyter.org/url/norvig.com/ipython/"
747
- "Economics.ipynb>`_ 由 `Peter Norvig <http://norvig.com/bio.html>`_ 對市場進行"
748
- "了模擬 ,顯示了該模組提供的許多工具和分佈(高斯、均勻、樣本、 beta 變數、選"
754
+ "Economics.ipynb>`_\\ 是由 `Peter Norvig <http://norvig.com/bio.html>`_ 對市場進行"
755
+ "的模擬 ,顯示了該模組提供的許多工具和分佈(高斯、均勻、樣本、 beta 變數、選"
749
756
"擇,三角形、隨機數)的有效使用。"
750
757
751
758
#: ../../library/random.rst:555
@@ -758,12 +765,12 @@ msgid ""
758
765
msgstr ""
759
766
"`機率的具體介紹(使用Python) <http://nbviewer.jupyter.org/url/norvig.com/"
760
767
"ipython/Probability.ipynb>`_ 為 `Peter Norvig <http://norvig.com/bio.html>`_ "
761
- "的教學課程,涵蓋了機率理論的基礎知識,如何模擬以及如何使用 Python 執行數據分"
768
+ "的教學課程,涵蓋了機率理論的基礎知識與如何模擬以及使用 Python 執行數據分"
762
769
"析。"
763
770
764
771
#: ../../library/random.rst:563
765
772
msgid "Recipes"
766
- msgstr "程式庫 "
773
+ msgstr "使用方案 "
767
774
768
775
#: ../../library/random.rst:565
769
776
msgid ""
@@ -786,16 +793,18 @@ msgid ""
786
793
"often as the next larger exponent."
787
794
msgstr ""
788
795
"以下範例採用不同的方法。間隔中的所有 float 都是可能的選擇。尾數來自 *2⁵² ≤ 尾"
789
- "數< 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現"
796
+ "數 < 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現"
790
797
"頻率是下一個較大指數的一半。"
791
798
792
799
#: ../../library/random.rst:593
793
800
msgid ""
794
801
"All :ref:`real valued distributions <real-valued-distributions>` in the "
795
802
"class will use the new method::"
796
803
msgstr ""
797
- "Class 中的所有 :ref:`real valued distribution <real-valued-distributions>` 都"
798
- "將使用新方法 ::"
804
+ "Class 中的所有\\ :ref:`實數分佈 <real-valued-distributions>`\\ 都"
805
+ "將使用新方法\n"
806
+ "\n"
807
+ "::"
799
808
800
809
#: ../../library/random.rst:602
801
810
msgid ""
@@ -807,7 +816,7 @@ msgid ""
807
816
msgstr ""
808
817
"該範例在概念上等效於一種演算法,該演算法從 *0.0 ≤ x < 1.0* 範圍內 2⁻¹⁰⁷⁴ 的所"
809
818
"有倍數中進行選擇。這些數字都是均勻分佈的,但大多數必須向下捨入到最接近的可表"
810
- "示的 Python float。( 2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math."
819
+ "示的 Python float。(2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math."
811
820
"ulp(0.0)``)"
812
821
813
822
#: ../../library/random.rst:611