Skip to content

Commit 29775cc

Browse files
sync with cpython 1afc0a95
1 parent 6601cd9 commit 29775cc

File tree

2 files changed

+334
-327
lines changed

2 files changed

+334
-327
lines changed

library/random.po

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.11\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-03-17 00:32+0000\n"
11+
"POT-Creation-Date: 2023-05-15 00:31+0000\n"
1212
"PO-Revision-Date: 2023-01-23 22:47+0800\n"
1313
"Last-Translator: Allen Wu <[email protected]>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -531,29 +531,29 @@ msgstr ""
531531

532532
#: ../../library/random.rst:313
533533
msgid ""
534-
"Gamma distribution. (*Not* the gamma function!) Conditions on the "
535-
"parameters are ``alpha > 0`` and ``beta > 0``."
534+
"Gamma distribution. (*Not* the gamma function!) The shape and scale "
535+
"parameters, *alpha* and *beta*, must have positive values. (Calling "
536+
"conventions vary and some sources define 'beta' as the inverse of the scale)."
536537
msgstr ""
537-
"Gamma(伽瑪)分佈。(*不是* Gamma 函式!)參數的條件為 ``alpha > 0`` 和 "
538-
"``beta > 0``。"
539538

540-
#: ../../library/random.rst:316
539+
#: ../../library/random.rst:318
541540
msgid "The probability distribution function is::"
542541
msgstr ""
543542
"Probability distribution function(機率密度函式)是:\n"
544543
"\n"
545544
"::"
546545

547-
#: ../../library/random.rst:325
546+
#: ../../library/random.rst:327
547+
#, fuzzy
548548
msgid ""
549-
"Normal distribution, also called the Gaussian distribution. *mu* is the "
549+
"Normal distribution, also called the Gaussian distribution. *mu* is the "
550550
"mean, and *sigma* is the standard deviation. This is slightly faster than "
551551
"the :func:`normalvariate` function defined below."
552552
msgstr ""
553553
"常態分佈,也稱為高斯分佈。*mu* 是平均數,*sigma* 是標準差。這比下面定義的 :"
554554
"func:`normalvariate` 函式快一點。"
555555

556-
#: ../../library/random.rst:329
556+
#: ../../library/random.rst:332
557557
msgid ""
558558
"Multithreading note: When two threads call this function simultaneously, it "
559559
"is possible that they will receive the same return value. This can be "
@@ -565,11 +565,11 @@ msgstr ""
565565
"可以透過三種方式避免。1)讓每個執行緒使用隨機數產生器的不同實例。2)在所有呼"
566566
"叫周圍加鎖。3)使用較慢但執行緒安全的 :func:`normalvariate` 函式代替。"
567567

568-
#: ../../library/random.rst:336 ../../library/random.rst:352
568+
#: ../../library/random.rst:339 ../../library/random.rst:355
569569
msgid "*mu* and *sigma* now have default arguments."
570570
msgstr ""
571571

572-
#: ../../library/random.rst:342
572+
#: ../../library/random.rst:345
573573
msgid ""
574574
"Log normal distribution. If you take the natural logarithm of this "
575575
"distribution, you'll get a normal distribution with mean *mu* and standard "
@@ -579,13 +579,13 @@ msgstr ""
579579
"對數常態分佈。如果你取此分佈的自然對數,你將獲得一個具有平均數 *mu* 和標準差 "
580580
"*sigma* 的常態分佈。*mu* 可以為任何值,並且 *sigma* 必須大於零。"
581581

582-
#: ../../library/random.rst:350
582+
#: ../../library/random.rst:353
583583
msgid ""
584584
"Normal distribution. *mu* is the mean, and *sigma* is the standard "
585585
"deviation."
586586
msgstr "常態分佈。*mu* 是平均數,*sigma* 是標準差。"
587587

588-
#: ../../library/random.rst:358
588+
#: ../../library/random.rst:361
589589
msgid ""
590590
"*mu* is the mean angle, expressed in radians between 0 and 2\\*\\ *pi*, and "
591591
"*kappa* is the concentration parameter, which must be greater than or equal "
@@ -596,28 +596,28 @@ msgstr ""
596596
"大於或等於零。如果 *kappa* 等於零,則此分佈在 0 到 2\\*\\ *pi* 的範圍內將減小"
597597
"為均勻的隨機角度。"
598598

599-
#: ../../library/random.rst:366
599+
#: ../../library/random.rst:369
600600
msgid "Pareto distribution. *alpha* is the shape parameter."
601601
msgstr "Pareto distribution(柏拉圖分佈)。*alpha* 是形狀參數。"
602602

603-
#: ../../library/random.rst:371
603+
#: ../../library/random.rst:374
604604
msgid ""
605605
"Weibull distribution. *alpha* is the scale parameter and *beta* is the "
606606
"shape parameter."
607607
msgstr ""
608608
"Weibull distribution(韋伯分佈)。*alpha* 是比例參數,*beta* 是形狀參數。"
609609

610-
#: ../../library/random.rst:376
610+
#: ../../library/random.rst:379
611611
msgid "Alternative Generator"
612612
msgstr "替代產生器"
613613

614-
#: ../../library/random.rst:380
614+
#: ../../library/random.rst:383
615615
msgid ""
616616
"Class that implements the default pseudo-random number generator used by "
617617
"the :mod:`random` module."
618618
msgstr "實現 :mod:`random` 模組使用的預設偽隨機數產生器的 class。"
619619

620-
#: ../../library/random.rst:383
620+
#: ../../library/random.rst:386
621621
msgid ""
622622
"In the future, the *seed* must be one of the following types: :class:"
623623
"`NoneType`, :class:`int`, :class:`float`, :class:`str`, :class:`bytes`, or :"
@@ -626,7 +626,7 @@ msgstr ""
626626
"將來,*seed* 必須是以下類型之一:\\ :class:`NoneType`、\\ :class:`int`、\\ :"
627627
"class:`float`、\\ :class:`str`、\\ :class:`bytes`、\\ :class:`bytearray`。"
628628

629-
#: ../../library/random.rst:390
629+
#: ../../library/random.rst:393
630630
msgid ""
631631
"Class that uses the :func:`os.urandom` function for generating random "
632632
"numbers from sources provided by the operating system. Not available on all "
@@ -640,11 +640,11 @@ msgstr ""
640640
"有效果且被忽略。如果呼叫 :meth:`getstate` 和 :meth:`setstate` 方法會引發 :"
641641
"exc:`NotImplementedError`。"
642642

643-
#: ../../library/random.rst:399
643+
#: ../../library/random.rst:402
644644
msgid "Notes on Reproducibility"
645645
msgstr "關於 Reproducibility(復現性)的注意事項"
646646

647-
#: ../../library/random.rst:401
647+
#: ../../library/random.rst:404
648648
msgid ""
649649
"Sometimes it is useful to be able to reproduce the sequences given by a "
650650
"pseudo-random number generator. By re-using a seed value, the same sequence "
@@ -654,47 +654,47 @@ msgstr ""
654654
"有時,能夠重現偽隨機數產生器給出的序列很有用。只要多執行緒未運行,透過重複使"
655655
"用種子值,同一序列就應該可以被復現。"
656656

657-
#: ../../library/random.rst:405
657+
#: ../../library/random.rst:408
658658
msgid ""
659659
"Most of the random module's algorithms and seeding functions are subject to "
660660
"change across Python versions, but two aspects are guaranteed not to change:"
661661
msgstr ""
662662
"大多數隨機 module 的演算法和 seed 設定函式在 Python 版本中可能會發生變化,但"
663663
"可以保證兩個方面不會改變:"
664664

665-
#: ../../library/random.rst:408
665+
#: ../../library/random.rst:411
666666
msgid ""
667667
"If a new seeding method is added, then a backward compatible seeder will be "
668668
"offered."
669669
msgstr "如果增加了新的 seed 設定函式,則將提供向後相容的播種器 (seeder)。"
670670

671-
#: ../../library/random.rst:411
671+
#: ../../library/random.rst:414
672672
msgid ""
673673
"The generator's :meth:`~Random.random` method will continue to produce the "
674674
"same sequence when the compatible seeder is given the same seed."
675675
msgstr ""
676676
"當相容的播種器被賦予相同的種子時,產生器的 :meth:`~Random.random` 方法將持續"
677677
"產生相同的序列。"
678678

679-
#: ../../library/random.rst:417
679+
#: ../../library/random.rst:420
680680
msgid "Examples"
681681
msgstr "範例"
682682

683-
#: ../../library/random.rst:419
683+
#: ../../library/random.rst:422
684684
msgid "Basic examples::"
685685
msgstr ""
686686
"基礎範例:\n"
687687
"\n"
688688
"::"
689689

690-
#: ../../library/random.rst:447
690+
#: ../../library/random.rst:450
691691
msgid "Simulations::"
692692
msgstr ""
693693
"模擬:\n"
694694
"\n"
695695
"::"
696696

697-
#: ../../library/random.rst:475
697+
#: ../../library/random.rst:478
698698
msgid ""
699699
"Example of `statistical bootstrapping <https://en.wikipedia.org/wiki/"
700700
"Bootstrapping_(statistics)>`_ using resampling with replacement to estimate "
@@ -706,7 +706,7 @@ msgstr ""
706706
"\n"
707707
"::"
708708

709-
#: ../../library/random.rst:488
709+
#: ../../library/random.rst:491
710710
msgid ""
711711
"Example of a `resampling permutation test <https://en.wikipedia.org/wiki/"
712712
"Resampling_(statistics)#Permutation_tests>`_ to determine the statistical "
@@ -720,15 +720,15 @@ msgstr ""
720720
"\n"
721721
"::"
722722

723-
#: ../../library/random.rst:515
723+
#: ../../library/random.rst:518
724724
msgid ""
725725
"Simulation of arrival times and service deliveries for a multiserver queue::"
726726
msgstr ""
727727
"模擬多伺服器佇列 (queue) 的到達時間與服務交付:\n"
728728
"\n"
729729
"::"
730730

731-
#: ../../library/random.rst:544
731+
#: ../../library/random.rst:547
732732
msgid ""
733733
"`Statistics for Hackers <https://www.youtube.com/watch?v=Iq9DzN6mvYA>`_ a "
734734
"video tutorial by `Jake Vanderplas <https://us.pycon.org/2016/speaker/"
@@ -739,7 +739,7 @@ msgstr ""
739739
"`Jake Vanderplas <https://us.pycon.org/2016/speaker/profile/295/>`_ 製作的教"
740740
"學影片,僅使用幾個基本概念(包括模擬、取樣、洗牌、交叉驗證)進行統計分析。"
741741

742-
#: ../../library/random.rst:550
742+
#: ../../library/random.rst:553
743743
msgid ""
744744
"`Economics Simulation <https://nbviewer.jupyter.org/url/norvig.com/ipython/"
745745
"Economics.ipynb>`_ a simulation of a marketplace by `Peter Norvig <https://"
@@ -752,7 +752,7 @@ msgstr ""
752752
"場進行的模擬,顯示了該模組提供的許多工具和分佈(高斯、均勻、樣本、 beta 變"
753753
"數、選擇,三角形、隨機數)的有效使用。"
754754

755-
#: ../../library/random.rst:557
755+
#: ../../library/random.rst:560
756756
msgid ""
757757
"`A Concrete Introduction to Probability (using Python) <https://nbviewer."
758758
"jupyter.org/url/norvig.com/ipython/Probability.ipynb>`_ a tutorial by `Peter "
@@ -765,17 +765,17 @@ msgstr ""
765765
"html>`_ 的教學課程,涵蓋了機率理論的基礎知識與如何模擬以及使用 Python 執行數"
766766
"據分析。"
767767

768-
#: ../../library/random.rst:565
768+
#: ../../library/random.rst:568
769769
msgid "Recipes"
770770
msgstr "使用方案"
771771

772-
#: ../../library/random.rst:567
772+
#: ../../library/random.rst:570
773773
msgid ""
774774
"These recipes show how to efficiently make random selections from the "
775775
"combinatoric iterators in the :mod:`itertools` module:"
776776
msgstr ""
777777

778-
#: ../../library/random.rst:599
778+
#: ../../library/random.rst:602
779779
msgid ""
780780
"The default :func:`.random` returns multiples of 2⁻⁵³ in the range *0.0 ≤ x "
781781
"< 1.0*. All such numbers are evenly spaced and are exactly representable as "
@@ -787,7 +787,7 @@ msgstr ""
787787
"均勻分佈的,並且可以完全表示為 Python float。但是,該間隔中的許多其他可表示"
788788
"的 float 不是可能的選擇。 例如 ``0.05954861408025609`` 不是 2⁻⁵³ 的整數倍。"
789789

790-
#: ../../library/random.rst:605
790+
#: ../../library/random.rst:608
791791
msgid ""
792792
"The following recipe takes a different approach. All floats in the interval "
793793
"are possible selections. The mantissa comes from a uniform distribution of "
@@ -799,7 +799,7 @@ msgstr ""
799799
"數 < 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現"
800800
"頻率是下一個較大指數的一半。"
801801

802-
#: ../../library/random.rst:627
802+
#: ../../library/random.rst:630
803803
msgid ""
804804
"All :ref:`real valued distributions <real-valued-distributions>` in the "
805805
"class will use the new method::"
@@ -809,7 +809,7 @@ msgstr ""
809809
"\n"
810810
"::"
811811

812-
#: ../../library/random.rst:636
812+
#: ../../library/random.rst:639
813813
msgid ""
814814
"The recipe is conceptually equivalent to an algorithm that chooses from all "
815815
"the multiples of 2⁻¹⁰⁷⁴ in the range *0.0 ≤ x < 1.0*. All such numbers are "
@@ -822,7 +822,7 @@ msgstr ""
822822
"示的 Python float。(2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math."
823823
"ulp(0.0)``)"
824824

825-
#: ../../library/random.rst:645
825+
#: ../../library/random.rst:648
826826
msgid ""
827827
"`Generating Pseudo-random Floating-Point Values <https://allendowney.com/"
828828
"research/rand/downey07randfloat.pdf>`_ a paper by Allen B. Downey describing "
@@ -833,6 +833,13 @@ msgstr ""
833833
"pdf>`_ Allen B. Downey 的一篇論文描述了產生比通常由 :func:`.random` 產生的 "
834834
"float 更 fine-grained(細粒的)的方法。"
835835

836+
#~ msgid ""
837+
#~ "Gamma distribution. (*Not* the gamma function!) Conditions on the "
838+
#~ "parameters are ``alpha > 0`` and ``beta > 0``."
839+
#~ msgstr ""
840+
#~ "Gamma(伽瑪)分佈。(*不是* Gamma 函式!)參數的條件為 ``alpha > 0`` 和 "
841+
#~ "``beta > 0``。"
842+
836843
#~ msgid ""
837844
#~ "The optional argument *random* is a 0-argument function returning a "
838845
#~ "random float in [0.0, 1.0); by default, this is the function :func:`."

0 commit comments

Comments
 (0)