How can I flip the order of a 1d numpy array? -


this question has answer here:

i have simple 1d np.array.

is there built in functions reverse it?

for example = [0, 1, 2, 3] = [3, 2, 1, 0]?

thanks

gabriele

it same regular arrays:

b = a[::-1] 

note, creates view on array. if change original array, reversed 1 reflect it.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -