반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- django
- Mac
- Redshift
- PySpark
- string
- Kotlin
- Python
- array
- hive
- SQL
- PostgreSQL
- 파이썬
- Java
- gas
- numpy
- dataframe
- list
- matplotlib
- math
- Apache
- Excel
- Tkinter
- Github
- google apps script
- Google Excel
- c#
- PANDAS
- GIT
- Google Spreadsheet
Archives
- Today
- Total
목록SEED (1)
달나라 노트
Python numpy : random seed (예상되는 난수 생성하기)
import numpy as np arr_1 = np.random.rand(5) print(arr_1) arr_2 = np.random.rand(5) print(arr_2) -- Result [0.64589411 0.43758721 0.891773 0.96366276 0.38344152] [0.79172504 0.52889492 0.56804456 0.92559664 0.07103606] numpy의 rand method로 랜덤한 숫자를 생성하면 위처럼 생성할때마다 다른 숫자가 return될겁니다. (같은 숫자가 return될 확률도 있지만 너무나도 적은 확률이겠죠.) import numpy as np np.random.seed(seed=0) arr_1 = np.random.rand(5) print(ar..
Python/Python numpy
2022. 1. 22. 22:56