일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- DeepLearning
- Security
- mariaDB
- data
- git
- 인공지능
- javascript
- learning
- 자바
- db
- LIST
- centos
- Github
- 함수
- Numpy
- interface
- Pattern
- Web
- Spring
- Python
- Linux
- framework
- Server
- java
- ai
- Analysis
- Deep
- SSH
- error
- mysql
- Today
- Total
PostIT
[Python/Data Analysis] Numpay - Universal Array Function - Day 7 본문
[Python/Data Analysis] Numpay - Universal Array Function - Day 7
shun10114 2017. 6. 8. 09:13# [Python/Data Analysis] Numpay - Universal Array Function - Day 7
import numpy as np
arr =np.arange(11)
arr
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
np.sqrt(arr)
array([ 0. , 1. , 1.41421356, 1.73205081, 2. ,
2.23606798, 2.44948974, 2.64575131, 2.82842712, 3. ,
3.16227766])
A = np.random.randn(10)
A
array([-0.66405485, 0.28749254, 0.27305696, 0.22232217, 0.8804781 ,
1.01018702, -0.15188718, -0.78006006, -1.5951455 , -0.79699985])
B = np.random.randn(10)
B
array([ 1.2901295 , 0.27894444, 0.87601362, 0.78304898, 0.55902046,
-1.65844088, -0.05473313, 1.34328664, 0.68122746, 1.70479054])
# Binary Functions
np.add(A,B)
array([ 0.62607465, 0.56643697, 1.14907058, 1.00537115, 1.43949856,
-0.64825385, -0.20662031, 0.56322658, -0.91391804, 0.90779069])
np.maximum(A,B)
array([ 1.2901295 , 0.28749254, 0.87601362, 0.78304898, 0.8804781 ,
1.01018702, -0.05473313, 1.34328664, 0.68122746, 1.70479054])
import webbrowser
website = 'https://docs.scipy.org/doc/numpy/reference/ufuncs.html#ufunc'
webbrowser.open(website)
True
'Python > Data Analysis' 카테고리의 다른 글
[Python/Data Analysis] Numpay - Array Tranposition 사용하기 - Day 6 (0) | 2017.06.08 |
---|---|
[Python/Data Analysis] Numpy 및 Matplotlib 사용하기 - Day 5 (0) | 2017.05.24 |
[Python/Data Analysis] Numpy 및 Matplotlib 사용하기 - Day 3 (0) | 2017.05.23 |
[Python/Data Analysis] Numpy 및 Matplotlib 사용하기 - Day 2 (0) | 2017.05.23 |
[Python/Data Analysis] Numpy 및 Matplotlib 사용하기 - Day 1 (0) | 2017.05.23 |