Skip to content

Commit

Permalink
Merge pull request #67 from kemingy/patch-1
Browse files Browse the repository at this point in the history
fix some typos
  • Loading branch information
laixintao committed Oct 23, 2019
2 parents 01e296e + ac9d03b commit 99e4bbd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion chapter3/06_How_to_use_a_process_in_a_subclass.rst
Expand Up @@ -54,7 +54,8 @@
print ('called run method in process: %s' % self.name)
return

在主程序中,我们创建了一些 ``MyProcess()`` 的子类。当 ``start()`` 方法被调用的时候进程开始执行: ::
在主程序中,我们创建了一些 ``MyProcess()`` 的子类。当 ``start()`` 方法被调用的时候进程开始执行: ::

p = MyProcess()
p.start()

Expand Down
2 changes: 1 addition & 1 deletion chapter3/10_How_to_use_a_process_pool.rst
Expand Up @@ -51,4 +51,4 @@

print ('Pool :', pool_outputs)

需要注意的是, ``pool.map()`` 方法的记过和Python内置的 ``map()`` 结果是相同的,不同的是 ``pool.map()`` 是通过多个并行进程计算的。
需要注意的是, ``pool.map()`` 方法的结果和Python内置的 ``map()`` 结果是相同的,不同的是 ``pool.map()`` 是通过多个并行进程计算的。
2 changes: 1 addition & 1 deletion chapter3/12_Point-to-point_communication.rst
Expand Up @@ -15,7 +15,7 @@ Python的 ``mpi4py`` 通过下面两个函数提供了点对点通讯功能:
|how|
-----

下面的例子展示了如何使用 ``comm.send`` 和 ``comm,recv`` 指令在不同的进程之间交换信息。 ::
下面的例子展示了如何使用 ``comm.send`` 和 ``comm.recv`` 指令在不同的进程之间交换信息。 ::

from mpi4py import MPI
comm = MPI.COMM_WORLD
Expand Down
2 changes: 1 addition & 1 deletion chapter5/05_Handling_map_functions_with_SCOOP.rst
Expand Up @@ -34,7 +34,7 @@ Python 的函数 ``map(aFunction, aSequence)`` 将在序列的每一个元素上

SCOOP 模块提供了多个 map 函数可以将异步计算任务下发到多个计算节点:

- ``futures.map((func, iterables, kargs)`` : 此函数返回一个生成器,可以按照输入的顺序遍历结果。可以说是内置 ``map`` 函数的一个并行执行版本。
- ``futures.map(func, iterables, kargs)`` : 此函数返回一个生成器,可以按照输入的顺序遍历结果。可以说是内置 ``map`` 函数的一个并行执行版本。
- ``futures.map_as_completed(func, iterables, kargs)`` : 每当有结果出现时,就立刻 yield 出来。
- ``futures.scoop.futures.mapReduce(mapFunc, reductionOp, iterables, kargs)`` : map 函数执行过后可以通过此函数执行 reduction 函数。返回结果是一个元素。

Expand Down
2 changes: 1 addition & 1 deletion chapter5/11_A_remote_procedure_call_with_RPyC.rst
Expand Up @@ -56,4 +56,4 @@ Remote Python Call(RPyC)是一个用作远程过程调用,同时也可以用

下来,我们执行了这条语句: ``c.execute("print('hi python cookbook')")`` 。

这条语句就会在服务器上执行print语句(远程的``exec``语句)。
这条语句就会在服务器上执行print语句(远程的 ``exec`` 语句)。

0 comments on commit 99e4bbd

Please sign in to comment.