[NumPy-Tickets] [NumPy] #1153: performing operations inplace to save memory allocations
NumPy Trac
numpy-tickets@scipy....
Sun Jan 23 16:53:33 CST 2011
#1153: performing operations inplace to save memory allocations
-------------------------+--------------------------------------------------
Reporter: lucaciti | Owner: charris
Type: enhancement | Status: apply
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: devel
Keywords: |
-------------------------+--------------------------------------------------
Comment(by m-paradox):
This idea is pretty good, but it does have some tricky interactions with
the new iterator ufunc implementation. I've added an order= parameter,
which controls the memory layout of the output, and it could be a lot of
messy code to make sure the input chosen for reuse matches the desired
output. It also doesn't look portable to NumPy 2.0/libndarray, where I
don't believe the assumption about reference counting will necessarily
hold. To go into NumPy, this patch would need to take into account the
subtype/wrapping mechanism, to support masked arrays and other derived
array types.
The new iterator doesn't help achieve the same effect, but the deferred
evaluation idea (longer term) would achieve better performance
improvements than this patch.
https://github.com/m-paradox/numpy/blob/mw_neps/doc/neps/deferred-ufunc-
evaluation.rst
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1153#comment:9>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list