Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: In numpy.i, clear CARRAY flag if wrapped buffer is not C_CONTIGUOUS.#10557

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
charris merged 3 commits intonumpy:maintenance/1.14.xfromcharris:backport-10546
Feb 9, 2018

Conversation

@charris
Copy link
Member

Backport of#10546.

Without this fix, arrays returned by the ARGOUTVIEW_FARRAY[2,3,4] ARGOUTVIEWM_FARRAY[2,3,4] typemaps have always the flag C_CONTIGUOUS as True even when the underlying buffer is not C contiguous leading to strange runtime behaviors.

Ex: copy() works correctly but binary element wise operations with another C contiguous array does not.

Otherwise the returned array has both flags, which creates all sorts of confusing runtime behaviors.C_CONTIGUOUS : TrueF_CONTIGUOUS : TrueDoesn't cause a crash, but some functions like copy() works in F_CONTIGUOUS others like element wise operators assume C_CONTIGUOUS, obviously this becomes a nightmare to debug.
Leave the flag if there's only one non unit dim
@charrischarris merged commita0f117d intonumpy:maintenance/1.14.xFeb 9, 2018
@charrischarris deleted the backport-10546 branchFebruary 9, 2018 18:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

00 - Bug08 - BackportUsed to tag backport PRscomponent: swig

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@charris@mlamarre

[8]ページ先頭

©2009-2025 Movatter.jp