python
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| python [2015/01/01 16:04] – donghee | python [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 129: | Line 129: | ||
| < | < | ||
| wget http:// | wget http:// | ||
| + | #wget http:// | ||
| tar xvfz clang+llvm-3.4.2-x86_64-apple-darwin10.9.xz | tar xvfz clang+llvm-3.4.2-x86_64-apple-darwin10.9.xz | ||
| Line 176: | Line 177: | ||
| int i = 1; | int i = 1; | ||
| double val = a; | double val = a; | ||
| - | while (i < n){val *= a;}; | + | while (i < n){val *= a; i++;}; |
| return val; | return val; | ||
| }; | }; | ||
| Line 194: | Line 195: | ||
| </ | </ | ||
| + | jeh_setup.py | ||
| < | < | ||
| - | xdress --rc jeh_xdressrc.py | + | import os |
| - | python3 | + | from distutils.core import setup |
| + | from distutils.extension import Extension | ||
| + | from Cython.Distutils import build_ext | ||
| + | |||
| + | import numpy as np | ||
| + | |||
| + | cwd = os.getcwd() | ||
| + | incdirs = [cwd, os.path.join(cwd, | ||
| + | |||
| + | ext_modules = [ | ||
| + | Extension(" | ||
| + | include_dirs=incdirs, | ||
| + | ] | ||
| + | |||
| + | setup( | ||
| + | name = ' | ||
| + | cmdclass = {' | ||
| + | ext_modules = ext_modules, | ||
| + | packages = [' | ||
| + | ) | ||
| + | </ | ||
| + | |||
| + | Makefile | ||
| + | |||
| + | < | ||
| + | all: | ||
| + | | ||
| + | | ||
| + | clean: | ||
| + | rm -rf build | ||
| + | rm -rf jehbuild | ||
| + | | ||
| </ | </ | ||
| Line 209: | Line 242: | ||
| a.power(42) | a.power(42) | ||
| </ | </ | ||
| - | |||
python.1420128246.txt.gz · Last modified: 2018/07/18 14:09 (external edit)