Yet another example is ``` d = np.zeros(n) d[1:] = np.linalg.norm(np.diff(points, axis=1), axis=0) r = d.cumsum() ``` https://github.com/WarrenWeckesser/ufunclab/blob/main/examples/linear_interp1d_demo.py#L13-L15 _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
- [Numpy-discussion] Re: Add to NumPy a function ... Sebastian Berg
- [Numpy-discussion] Re: Add to NumPy a function to c... Dom Grigonis
- [Numpy-discussion] Re: Add to NumPy a function ... john . dawson
- [Numpy-discussion] Re: Add to NumPy a funct... Ilhan Polat
- [Numpy-discussion] Re: Add to NumPy a f... Dom Grigonis
- [Numpy-discussion] Re: Add to NumPy a f... Ronald van Elburg
- [Numpy-discussion] Re: Add to NumP... Ronald van Elburg
- [Numpy-discussion] Re: Add to ... Ralf Gommers
- [Numpy-discussion] Re: Add to ... Ronald van Elburg
- [Numpy-discussion] Re: Add to ... Warren Weckesser
- [Numpy-discussion] Re: Add to ... john . dawson
- [Numpy-discussion] Re: Add to NumP... Ilhan Polat
- [Numpy-discussion] Re: Add to ... Ronald van Elburg
- [Numpy-discussion] Re: Add to ... Dom Grigonis
- [Numpy-discussion] Re: Add to ... Michael Siebert
- [Numpy-discussion] Re: Add to NumPy a funct... Dom Grigonis
- [Numpy-discussion] Re: Add to NumPy a f... john . dawson
- [Numpy-discussion] Re: Add to NumP... Alan G. Isaac
- [Numpy-discussion] Re: Add to NumP... Dom Grigonis
- [Numpy-discussion] Re: Add to NumPy a function to comput... Nathan