How does numpy deal with the nth to m elements

vector = np.array ([2Jing 4 Jing 6 Jing 8 Jing 10])
deal with 1: 2 to 4 elements, take the reverse

vector = np.array([1,2,3,4,5,6])
vector[vector>2]
vector[np.where(vector>3)]

processing 2: reverse values greater than 2 and less than 8

:
vector[vector>1 and vector<5]
:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I wonder why range interpretation can"t be done

Mar.10,2022

use slicing, vector [1:4] * =-1

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a92d-2b589.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a92d-2b589.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?