NumPy foreach column

Jmnote (토론 | 기여)님의 2021년 12월 12일 (일) 16:23 판 (새 문서: ==개요== ;NumPy foreach column <syntaxhighlight lang='python' notebook> import numpy as np m = np.matrix([[101,102,103], [201,202,203], [301,302,303],...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

NumPy foreach column
import numpy as np
m = np.matrix([[101,102,103],
               [201,202,203],
               [301,302,303],
               [401,402,403]])
m
def myfunc(x):
  print(x)
np.apply_along_axis(myfunc, axis=0, arr=m)
np.apply_along_axis(lambda x: print(x), axis=0, arr=m)

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}