機械学習のラベルデータによく利用する.
もっと速い書き方あるだろうなー
python
>>> import numpy as np
>>> y = np.array([[1], [1], [0], [1], [0]])
>>> y
array([[1],
[1],
[0],
[1],
[0]])
>>> z = np.array([x for x in y])
>>> z
array([1, 1, 0, 1, 0])
Go to list of users who liked
More than 5 years have passed since last update.
機械学習のラベルデータによく利用する.
もっと速い書き方あるだろうなー
>>> import numpy as np
>>> y = np.array([[1], [1], [0], [1], [0]])
>>> y
array([[1],
[1],
[0],
[1],
[0]])
>>> z = np.array([x for x in y])
>>> z
array([1, 1, 0, 1, 0])
Register as a new user and use Qiita more conveniently
Go to list of users who liked