<div dir="ltr">Hi Juan<div><br></div><div>Thanks for the kind words!</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">why isn’t there a Subtract operator?<br></blockquote><div><br></div><div>I <i>think</i> this is just because the implementation in Pyre is still an early prototype. Alfonso?</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">is there a prospect for using actual operators and actual literals here?<br></blockquote><div><br></div><div>That's a really good question. We're optimistic that actual literals should be possible - we assumed there was some subtle reason we'd have to use Literal, but when we briefly talked about it at PyCon, Guido was like "Nope, you should just write a PEP for that". As for actual operators - I can't think of any <i>technical</i> reason this shouldn't be possible - when it comes time to write a PEP for type arithmetic it's definitely something we should propose. Alfonso, any thoughts?</div><div><br></div><div>Best,</div><div>Matthew</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 14 Jun 2021 at 03:51, Juan Nunez-Iglesias <<a href="mailto:jni@fastmail.com">jni@fastmail.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 style="overflow-wrap: break-word;">Thank you so much Matthew, Pradeep, and everyone else helping with this effort!<div><br></div><div>And thanks Matthew for sharing the slides — very informative! I’ve asked Sebastian for the recording but in the meantime I thought I’d ask a couple of questions about the syntax:</div><div><br></div><div>* why isn’t there a Subtract operator? It seems that Subtract[A, B] is much more readable than Add[A, Multiply[Literal[-1], B]]?</div><div>* is there a prospect for using actual operators and actual literals here? I think that a lot of reticence about Python typing comes from the annotations being so difficult to read. There’s been some great improvements recently with “Optional[Tuple[Union[Float, Int]]]” becoming “tuple[float | int] | None”, and I hope we can leapfrog the awkward phase with this tensor typing stuff. Again, A - B is much more readable again than Subtract[A, B]. And B-2 is much more readable than Add[B, Literal[-2]].</div><div><br></div><div>Other than that, love the work, thank you again!</div><div><br></div><div>Juan.</div><div><div><br><blockquote type="cite"><div>On 11 Jun 2021, at 5:08 am, Matthew Rahtz <<a href="mailto:mrahtz@google.com" target="_blank">mrahtz@google.com</a>> wrote:</div><br><div><div dir="ltr">Some links I promised to send around:<div><ul><li><a href="https://github.com/deepmind/tensor_annotations" target="_blank">https://github.com/deepmind/tensor_annotations</a> which has a bunch of experimental shape-aware stubs for TensorFlow and JAX using 'semantic' axis labels<br></li><li><a href="https://github.com/pradeep90/pytorch_examples" target="_blank">https://github.com/pradeep90/pytorch_examples</a> ditto for TensorFlow and PyTorch using value-based axis labels<br></li><li><a href="https://arxiv.org/pdf/2102.13254.pdf" target="_blank">https://arxiv.org/pdf/2102.13254.pdf</a> Similar work in TensorFlow for Swift<br></li><li><a href="https://docs.google.com/presentation/d/1kLS-bz1ZmJIFizZExkm8N9jqAj2oOJzTmUaL8INGefc/edit?usp=sharing&resourcekey=0-eFDyGvcEeeHzF62x6Cwl6Q" target="_blank">Slides</a> for our presentation<br></li><li><a href="https://docs.google.com/document/d/1oaG0V2ZE5BRDjd9N-Tr1N0IKGwZQcraIlZ0N8ayqVg8/edit" target="_blank">Tensor typing meeting details</a><br></li></ul><div>Thanks again, everyone!</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 9 Jun 2021 at 22:28, Sebastian Berg <<a href="mailto:sebastian@sipsolutions.net" target="_blank">sebastian@sipsolutions.net</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">On Tue, 2021-06-08 at 11:40 -0700, Stefan van der Walt wrote:<br>
> On Tue, Jun 8, 2021, at 03:23, Juan Nunez-Iglesias wrote:<br>
> > Hello! Any chance this could be recorded for those of us in useless<br>
> > time zones? 😂 <br>
> <br>
> I added a note to the agenda; we'll ask the speakers and record if<br>
> they don't mind.<br>
<br>
<br>
We have made a recording, but I did not plan on making it available<br>
publicly.  Please contact me directly if you are interested.<br>
<br>
Cheers,<br>
<br>
Sebastian<br>
<br>
<br>
> Stéfan<br>
> _______________________________________________<br>
> NumPy-Discussion mailing list<br>
> <a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
<br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div>
_______________________________________________<br>NumPy-Discussion mailing list<br><a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/numpy-discussion" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div>