benwtrent commented on issue #10665:
URL: https://github.com/apache/lucene/issues/10665#issuecomment-1297430223

   @ovalhub `numpy` collections are already native. To use them, I have to pull 
them into python collections and then cast them to be native again. 
   
   Example:
   ```
   X = X.tolist()
   doc.add(KnnVectorField("knn", JArray('float')(X), fieldType))
   ```
   The `.toList()` is weird to me as `X` is already a natively backed float 
array, just a numpy object. 
   
   Admittedly, I may be misunderstanding how the communication between Python 
-> `native` -> Java is done. But it SEEMS that calling `tolist` for numpy 
unnecessarily pulls an already native collection into a generic python list.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to