[Numpy-discussion] [Feature Request] Add alias of np.concatenate as np.concat

Iordanis Fostiropoulos danny.fostiropoulos at gmail.com
Mon Jun 1 14:22:25 EDT 2020

In regard to Feature Request: https://github.com/numpy/numpy/issues/16469

It was suggested to sent to the mailing list. I think I can make a strong
point as to why the support for this naming convention would make sense.
Such as it would follow other frameworks that often work alongside numpy
such as tensorflow. For backward compatibility, it can simply be an alias
to np.concatenate

I often convert portions of code from tf to np, it is as simple as changing
the base module from tf to np. e.g. np.expand_dims -> tf.expand_dims. This
is done either in debugging (e.g. converting tf to np without eager
execution to debug portion of the code), or during prototyping, e.g.
develop in numpy and convert in tf.

I find myself more than at one occasion to getting syntax errors because of
this particular function np.concatenate. It is unnecessarily long. I
imagine there are more people that also run into the same problems. Pandas
uses concat (torch on the other extreme uses simply cat, which I don't
think is as descriptive).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20200601/9aca4fba/attachment.html>

More information about the NumPy-Discussion mailing list