<div dir="auto">I agree with all of Ralf's points, except for perhaps this one:<div dir="auto"><br></div><div dir="auto">> I also don't see a reason to conform to TensorFlow (or PyTorch, or Matlab, or whichever other library)</div><div dir="auto"><br></div><div dir="auto">Python itself has a name for this function, `operator.concat` - so _maybe_ this sets a strong enough precedent for us to add an alias.</div><div dir="auto"><br></div><div dir="auto">But we already diverge from the stardard library on things like `np.remainder` vs `math.remainder` - so my feeling is this still isn't worth it.</div><div dir="auto"><br></div><div dir="auto">Eric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 6, 2020, 15:21 Ralf Gommers <<a href="mailto:ralf.gommers@gmail.com">ralf.gommers@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 6, 2020 at 2:58 PM Adrin <<a href="mailto:adrin.jalali@gmail.com" target="_blank" rel="noreferrer">adrin.jalali@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-size:small">This somehow also reminds me of the `__array_module__` (NEP37) protocol.</div><div style="font-size:small"><br></div><div style="font-size:small">I'm not sure if TF would ever implement it, but it would be really nice if the NEP37 proposal</div><div style="font-size:small">would move forward and libraries would implement it.<br></div></div></div></blockquote><div><br></div><div>There is a plan to move forward with the various proposals on the array protocol front: <a href="https://github.com/numpy/archive/blob/master/other_meetings/2020-04-21-array-protocols_discussion_and_notes.md" target="_blank" rel="noreferrer">https://github.com/numpy/archive/blob/master/other_meetings/2020-04-21-array-protocols_discussion_and_notes.md</a></div><div><br></div><div>At this point I think it needs work to implement and exercise the alternatives, rather than a decision. <br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-size:small"></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 1, 2020 at 8:22 PM Iordanis Fostiropoulos <<a href="mailto:danny.fostiropoulos@gmail.com" target="_blank" rel="noreferrer">danny.fostiropoulos@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:2077px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div id="m_-1033594178443708994gmail-m_3105012009290165333gmail-m_-8701919839011083649gmail-:sk" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="m_-1033594178443708994gmail-m_3105012009290165333gmail-m_-8701919839011083649gmail-:sl" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr">In regard to Feature Request: <a href="https://github.com/numpy/numpy/issues/16469" target="_blank" rel="noreferrer">https://github.com/numpy/numpy/issues/16469</a><br><br><div>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</div><div><br></div><div>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. </div><div><br></div><div>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). </div></div></div></div></div></div></div></blockquote></div></div></blockquote><div><br></div><div>I don't think this is a good idea. We have a lot of poor function and object names,</div><div>adding aliases for those isn't a healthy idea. `concatenate` is a good, descriptive name.</div><div>Adding an alias for it just gives two equivalent ways of calling the same functionality,</div><div>puts an extra burden on other libraries that want to be numpy-compatible,</div><div>puts an extra burden on users that now see two similar function names (e.g. with</div><div>tab completion) that they then need to look up to decide which one to use,<br></div><div>and generally sets a bad precedent. <br></div><div><br></div><div>Saving five characters is not a good enough reason to add an alias. <br></div><div><br></div><div>I also don't see a reason to conform to TensorFlow (or PyTorch, or Matlab, or</div><div>whichever other library). If we're adding a new function then yes by all means</div><div>look at prior art, but here we have 15 years of existing uses of a sensibly named</div><div>function.<br></div><div><br></div><div>Cheers,<br></div><div>Ralf</div><div><br></div><div><br></div><div><br></div></div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank" rel="noreferrer">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div>