np.delete and np.s_. What's so special about np_s?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I don't really understand why regular indexing can't be used for np.delete. What makes np.s_ so special? For example with this code, used to delete the some of the rows of this array.. inlet_names = np.delete(inlet_names, np.s_[1:9], axis = 0) Why can't I simply use regular indexing and do.. inlet_names = np.delete(inlet_names, [1:9], axis = 0) or inlet_names = np.delete(inlet_names, inlet_names[1:9], axis = 0) From what I can gather, np.s_ is the same as np.index_exp except it doesn't return a tuple, but both can be used anywhere in Python