Akash Varude
Akash Varude

Reputation: 47

How to convert dimensions of numpy array?

Y_train.shape

Output is

(650,)

but I want output as

(650,1)

What should I do?

Upvotes: 0

Views: 27

Answers (1)

Ethan
Ethan

Reputation: 1373

This should do the trick-

Y_train = Y_train[:, np.newaxis]

Upvotes: 1

Related Questions