How to return a view of several columns in numpy structured array

后端 未结 5 2112
既然无缘
既然无缘 2021-01-31 18:13

I can see several columns (fields) at once in a numpy structured array by indexing with a list of the field names, for example

import n         


        
5条回答
  •  滥情空心
    2021-01-31 18:47

    As of Numpy version 1.13, the code you propose will return a view. See 'NumPy 1.12.0 Release Notes->Future Changes->Multiple-field manipulation of structured arrays' on this page:

    https://docs.scipy.org/doc/numpy-dev/release.html

提交回复
热议问题