Updating to numpy 2.1.3 solved it. Contrary to the documentation, which says it was added with 1.26.0, it is only available in a higher version. Apparently there happened a mistake when creating the documentation. Thanks to @TomMcLean for pointing where to look at.