Do we really need numpy?
Created by: wangkuiyi
I noticed that in our Dockerfile template, we install numpy
in the production Docker image.
Is numpy really necessary?
To my understand, numpy is needed because some Python programs convert loaded data into numpy matrices, whose memory layout happens to be the same as our C++ code's, so that our C++ code can re-use the numpy matrices' memory space.
Compared with this three-step conversion native Python type -- numpy matrices -- C++ data
, a more sound and efficient alternative is native Python type -- C++ data
?
Also, I am afraid that there are some fragile assumptions there letting C++ code re-use Python data.
Please review my concerns. Thanks!