[Numpy-discussion] Helper function for assignment from other structured arrays
Feng Yu
rainwoodman at gmail.com
Mon Sep 17 18:14:00 EDT 2018
Hi,
Assignment between structured arrays are matching by the order of fields,
not by names of fields.
Is there a recommended way of assignment by matching field names? I can see
one way is to explicitly looping over the names; another possibility is to
use the field names of the target array to index the source array.
It would be nice if a recommended practice is provided as example near the
documentation on the topic:
https://docs.scipy.org/doc/numpy/user/basics.rec.html#assignment-from-other-structured-arrays
Thanks,
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180917/ee0ac1e9/attachment.html>
More information about the NumPy-Discussion
mailing list