Out paramter for argsort?

Argsort returns its result in a new array. It would be useful if allocation of the new array could be avoided when a suitable array is already available. Is there a reason why this wouldn't be useful or problematic to implement?

Hello, One thing I can think off right off the bat is that it’d only be useful if the out argument has the correct dtype (np.uintp, if I’m not mistaken). I’m not sure how much of a nuisance that could be for end users, but I assume not very much given the correct error message. Best regards, Hameer Abbasi Von meinem iPhone gesendet
Am 22.10.2022 um 17:51 schrieb Paul Rudin <paul@rudin.co.uk>:
Argsort returns its result in a new array. It would be useful if allocation of the new array could be avoided when a suitable array is already available.
Is there a reason why this wouldn't be useful or problematic to implement? _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-leave@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: hameerabbasi@yahoo.com
participants (2)
-
Hameer Abbasi
-
Paul Rudin