Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb547145

Browse files
committed
add parallel
1 parente4d3eea commitb547145

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎content/12-extensions/extensions-example.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ of the JIT compilation.
8787
:language: python
8888
```
8989

90+
````{tip}
91+
We can get even better performance if we let numba do things in parallel, with
92+
93+
```
94+
@njit(parallel=True)
95+
```
96+
````
97+
9098
##Cython version
9199

92100
We can install Cython by doing

‎examples/extensions/numba/mandel.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fromnumbaimportnjit
44

55

6-
@njit()
6+
@njit(nopython=True)
77
defmandelbrot(N,
88
xmin=-2.0,xmax=2.0,
99
ymin=-2.0,ymax=2.0,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp