[Numpy-discussion] Documentation Team meeting - Monday July 18 **NEW TIME** 2pm UTC

2022-07-15 Thread Melissa Mendonça
Hi all!

Our next Documentation Team meeting will happen on *Monday, July 18th*
at ***2PM
UTC***.

We are experimenting with this new time as a few contributors reached out
and mentioned that the original time didn't work for them.

*Please note that changes in the calendar may take a while to propagate.*

All are welcome - you don't need to already be a contributor to join. If
you have questions or are curious about what we're doing, we'll be happy to
meet you!

If you wish to join on Zoom, use this link:

https://zoom.us/j/96219574921?pwd=VTRNeGwwOUlrYVNYSENpVVBRRjlkZz09

Here's the permanent hackmd document with the meeting notes (still being
updated):

https://hackmd.io/oB_boakvRqKR-_2jRV-Qjg


Hope to see you around!

* You can also visit https://scientific-python.org/calendars to add the
NumPy community calendar as an .ics file to your preferred calendar manager

- Melissa
___
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] Question about specifying structured dtype alignment

2022-07-15 Thread Keith Morley
Hello,

I have looked around for an answer to this, but havent found exactly what I
need.  I want to be able to create a structured dtype representing a C
struct with non-default alignment.  An example struct:

struct *__attribute__((aligned(8)))* float2
{
float x;
float y;
};


I can create dtype with two floats easily enough:

float2_dtype = np.dtype( [ ( 'x', 'f4' ), ( 'y', 'f4' ) ], align=True )


but the alignment for this dtype (float2_dtype.alignment) will be 4.  This
means that if I pack this dtype into another structured dtype I will get
alignment errors.  What I would really like to do is

float2_dtype.alignment = 8 # gives AttributeError: readonly attribute

or

float2_dtype = np.dtype( [ ( 'x', 'f4' ), ( 'y', 'f4' ) ], align=True,
*alignment=8* ) # Invalid keyword argument for dtype()


Is there a way to to this?  I apologize if I have missed an obvious
solution to this issue -- I have grepped around the internet and this
mailing list with no success.

Thanks
keith



-- 


*Selfishness is not living as one wishes to live, it is asking others to
live as one wishes to live.- Oscar Wilde*
___
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