Skip to content

Compilation failure using numpy 2.0.0b1 #431

Closed

Description

@duburcqa

I tried to compile Boost::Python 1.84 library against numpy==2.0.0b1, but I'm getting a compilation error:

libs/python/src/numpy/dtype.cpp:101:83: error: no member named 'elsize' in '_PyArray_Descr'
int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}

Activity

  1. duburcqa commented on Mar 15, 2024

    @duburcqa
    ContributorAuthor

    See related part of numpy documentation: https://numpy.org/devdocs/release/2.0.0-notes.html#descriptor-elsize-and-alignment-access

    The new accessor PyDataType_ELSIZE must be used: PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()))

  2. jakirkham commented on May 7, 2024

    @jakirkham
    Contributor

    Was this fixed with PR ( #432 )?

  3. duburcqa commented on May 7, 2024

    @duburcqa
    ContributorAuthor

    Yes. Closing.

  4. jakirkham commented on May 7, 2024

    @jakirkham
    Contributor

    Thanks Alexis! 🙏

  5. jakobandersen commented on Aug 19, 2024

    @jakobandersen

    While fixed now, it doesn't seem possible to build any prior Boost release if NumPy 2.x is installed. Is it possible to disable just the NumPy part when building via the central b2?

  6. jakirkham commented on Aug 19, 2024

    @jakirkham
    Contributor

    Boost 1.86.0 got released just a few days ago. Did this not make it in there?

  7. jakobandersen commented on Aug 19, 2024

    @jakobandersen

    Boost 1.86.0 got released just a few days ago. Did this not make it in there?

    It doesn't look like it :-(

  8. jakirkham commented on Aug 19, 2024

    @jakirkham
    Contributor

    @stefanseefeld what do we need to do to get this in the next Boost release? Is 1.86.1 an option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions