Advertisement

TrimwebsolutionsTrimwebsolutions

Problem and Solutions

From row to column vector for a specific condition in python ?

By M.K. Verma · 3 May 2022

From row to column vector for a specific condition in python ?

You can use this:

values = [[x] for x in values]

and make it a numpy array like this:

values = Flux[Flux >= 0]
values = np.array([[x] for x in values])
print("positive values =",[values])