반응형
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 | 31 |
Tags
- PANDAS
- Apache
- c#
- django
- Google Excel
- list
- math
- array
- PostgreSQL
- PySpark
- dataframe
- Mac
- 파이썬
- google apps script
- GIT
- Python
- string
- SQL
- Java
- Github
- matplotlib
- Redshift
- Excel
- Kotlin
- Google Spreadsheet
- numpy
- gas
- hive
- Tkinter
Archives
- Today
- Total
목록randint (2)
달나라 노트
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