배열 전체 혹은 배열에서 한 축을 따르는 자료에 대한 통계를 계산하는 수학 함수는 배열 메서
드로 사용할 수 있다. 전체의 합(
sum
)이나 평균(
mean
), 표준편차(
std
)는
NumPy
의 최상위
함수를 이용하거나 배열의 인스턴스 메서드를 사용해서 구할 수 있다.
임의의 정규 분포 데이터를 생성하고 집계해보자.
In
[
177
]:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.