1

I have a variable p of type <class 'numpy.ndarray'>.

The value of p.shape is (100, 1).

How can I convert it to (100,)?

The content of p is

array([[1],
       [2],
       [3],
       ...
       [98],
       [99],
       [100]])

I want to convert it to

array( [1],
       [2],
       [3],
       ...
       [98],
       [99],
       [100])
Brian
  • 10,096
  • 18
  • 73
  • 131

0 Answers0