NumPy vectorize()

1 개요[ | ]

NumPy vectorize()
import numpy as np
import re
a = np.array(['apple1.1', 'banana2.2', 'lemon3.3'])
b = np.vectorize(lambda x: float(re.search(r"[0-9.]+", x).group(0)))(a)
print( b )
print( type(b[0]) )

2 같이 보기[ | ]

3 참고[ | ]

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