-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Function signature mismatch: random_multinomial #24490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There's also serge-sans-paille/pythran#2139 which is due to the signature changes for |
ISTR seeing related errors indicating that those were needed for cython 3. I'm not opposed to fixups as long as the tests still pass, so we could try removing them and see what happens. |
I think reverting that parch from the 1.25 and subsequent 1.x branches that won't use Cython 3 was the conclusion of the other thread #24429. |
@bashtage Anyway to make them cython version dependent? I'd like to keep Cython 3 support. |
Maybe I am missing something, but removing |
The Cython 2 default was "False", in Cython 3 it was changed to "True". Because NumPy 1.26.x supports both Cython versions, make it "False" for compatibility. Closes numpy#24490.
Turns out that the
I think the problem here is that See #24606. |
Yep, that looks like a bug. Note that both meson and setup build define |
This was done to allow us to share as much code as possible between |
I don't see why this issue would be related to the binding issue. As an alternative, we could just change the function name at compile time so that the function names used in |
Isn't this fixed with gh-24606 merged? |
Sorry, I agree with @bashtage this is unrelated to binding, if there is a change in behavior, I suspect it must be related to meson somehow. The It isn't clear to me why this changed, maybe
@bashtage would you be willing to look into that? Unless it leads to massive duplication at least that seems quite reasonable on first thought. |
It's still built twice it looks like:
and the We haven't ported over the Emscripten CI job though, so we haven't yet been able to see if something may be wrong for Pyodide. |
@rgommers, I suspect the mistake is including
but the old code doesn't link |
Ah, great catch @seberg! I suspect I just misread this when translating it, due to the confusing variable name: mtrand_libs = ['m', 'npymath'] if os.name != 'nt' else ['npymath']
config.add_extension('mtrand',
...
libraries=mtrand_libs, And also, The The build config seems slightly inefficient, I'm wondering if we could gain something there. The extension modules in
And in the
That's something for later though. Do you want to open a PR with the fix, or should I? |
Not well versed with meson best practices, so please just go ahead. |
The Cython 2 default was "False", in Cython 3 it was changed to "True". Because NumPy 1.26.x supports both Cython versions, make it "False" for compatibility. Closes numpy#24490.
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
When I try to statically link NumPy to Pyodide, it works fine, but I am getting a warning about two conflicting definitions for
random_multinomial
.Error message:
Context for the issue:
@hoodmane did some investigation on this in pyodide/pyodide#4083 and concluded that:
The text was updated successfully, but these errors were encountered: