[Numpy-discussion] Journey with NumPy in Docs Development

2020-07-26 Thread Saber Tooth
Hello @Melissa Mendonça @Ralf Gommers @Matti Picus , My journey working with NumPy Docs team has been nothing short of Progressive , the insights that i have gained attending the Docs meeting has helped me refine my proposal . Attending the past 3 meetings have helped me remove some of redunda

Re: [Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-26 Thread Feng Yu
Hi, Would it be possible to also allow a byte offset for the field? e.g., class Point(np.struct): x: np.field('i4', offset=8) y: np.field(' wrote: > Better would be to have an object like NamedTuple in typing that would > allow > > class Point(DType): > x: np.int16 > y: np.int16 > >

Re: [Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-26 Thread Eyal Kutz
*Kevin Sheppard, I agree with you but* I don't know how to do this. do you? ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-26 Thread Kevin Sheppard
Better would be to have an object like NamedTuple in typing that would allow class Point(DType): x: np.int16 y: np.int16 On Sun, Jul 26, 2020 at 3:22 PM Eyal Kutz wrote: > I am interested in suggesting an API improvement for NumPy. > I wish to make it so that the following code: > @np

[Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-26 Thread Eyal Kutz
I am interested in suggesting an API improvement for NumPy. I wish to make it so that the following code: @np.dtype class Point: x: np.int16 y: np.int16 would be equivalent to the following code: Point = np.dtype([('x', np.int16), ('y', np.int16)]) I am willing to submit the code changes r