반응형
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 |
Tags
- SQL
- Excel
- c#
- PostgreSQL
- Kotlin
- django
- Java
- Apache
- PySpark
- list
- hive
- GIT
- 파이썬
- Google Excel
- google apps script
- gas
- dataframe
- Python
- Google Spreadsheet
- Mac
- Github
- string
- array
- Tkinter
- matplotlib
- Redshift
- numpy
- math
- PANDAS
Archives
- Today
- Total
목록randn (1)
달나라 노트
Python numpy : random.rand, random.randint, random.randn (난수 생성 모듈, numpy 랜덤 숫자 생성, 표준 정규분포 난수 생성)
Python numpy library에는 난수(랜덤한 숫자)를 생성하는 method들이 있는데 어떤 것들이 있고 어떻게 사용할 수 있는지 알아봅시다. - numpy.random.rand() rand method는 0 이상 1 미만의 랜덤한 실수를 생성합니다. import numpy as np test_value = np.random.rand() print(test_value) -- Result 0.11999006968888681 import numpy as np test_value = np.random.rand(3) print(test_value) -- Result [0.56929945 0.43654139 0.87778867] 위 예시처럼 rand method에 숫자를 넣어주면 넣은 숫자의 길이만큼 랜덤..
Python/Python numpy
2022. 1. 2. 03:35