diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-09-30 12:52:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-30 12:52:16 -0500 |
commit | 4a7926f7085482a5f1f3669715ca20d20f12099a (patch) | |
tree | 9c595d88ccd5d242661407772b35449125eb2f00 /doc/release | |
parent | 87c1fcd0308ee78e743401bac2b0085249cca1e5 (diff) | |
parent | 12bd7c372ab5eeeff8bd2a46d765ccf28c6ce486 (diff) | |
download | numpy-4a7926f7085482a5f1f3669715ca20d20f12099a.tar.gz |
Merge pull request #6377 from ahaldane/fix_align
BUG: define "uint-alignment", fixes complex64 alignment
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.16.0-notes.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst index f85ecb300..72bf96295 100644 --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -69,6 +69,21 @@ old behavior, use ``np.isnat`` to explicitly check for NaT or convert datetime64/timedelta64 arrays with ``.astype(np.int64)`` before making comparisons. +complex64/128 alignment has changed +----------------------------------- +The memory alignment of complex types is now the same as a C-struct composed of +two floating point values, while before it was equal to the size of the type. +For many users (for instance on x64/unix/gcc) this means that complex64 is now +4-byte aligned instead of 8-byte aligned. An important consequence is that +aligned structured dtypes may now have a different size. For instance, +``np.dtype('c8,u1', align=True)`` used to have an itemsize of 16 (on x64/gcc) +but now it is 12. + +More in detail, the complex64 type now has the same alignment as a C-struct +``struct {float r, i;}``, according to the compiler used to compile numpy, and +similarly for the complex128 and complex256 types. + + C API changes ============= |