Hello,

I am documenting some code, translating the core of the algorithm to
LaTeX.  The style I have currently is very similar to the einsum syntax
(which is awesome btw).  Here
<https://gist.github.com/mattharrigan/68b292e64381bba6b78a06a6f1762fa2> is
an example of some of the basic operations in NumPy.  One part I do not
know how to capture well is boolean indexing, ie:

mask = np.array([1, 0, 1])
x = np.array([1, 2, 3])
y = x[mask]

Any suggestions on how to clearly, formally, and concisely show that
operation?  Also, are there any guides on translating NumPy to LaTeX?  It
might be helpful for documenting algorithms and also for people learning
NumPy.

Thank you,
Matt
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to