Skip to content

Fix imag for 0-size array#2886

Merged
toslunar merged 5 commits intocupy:masterfrom
niboshi:fix-imag-0-size
Feb 6, 2020
Merged

Fix imag for 0-size array#2886
toslunar merged 5 commits intocupy:masterfrom
niboshi:fix-imag-0-size

Conversation

@niboshi
Copy link
Copy Markdown
Member

@niboshi niboshi commented Dec 25, 2019

Fixes #2885

@niboshi niboshi added cat:bug Bugs to-be-backported Pull-requests to be backported to stable branch labels Dec 25, 2019
@niboshi
Copy link
Copy Markdown
Member Author

niboshi commented Dec 25, 2019

If #2870 is merged earlier, its TODO can be addressed.

@kmaehashi kmaehashi self-assigned this Dec 26, 2019
@niboshi
Copy link
Copy Markdown
Member Author

niboshi commented Dec 26, 2019

If #2870 is merged earlier, its TODO can be addressed.

Done. PTAL

Copy link
Copy Markdown
Member

@toslunar toslunar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the following approach?

memptr = self.data
if memptr.ptr:
    memptr += self.dtype.itemsize // 2

@niboshi
Copy link
Copy Markdown
Member Author

niboshi commented Jan 20, 2020

Your intention is to make the resulting array alway a view of the original array, right?
Fixed as you suggestion, thanks!

@toslunar toslunar added this to the v8.0.0a1 milestone Jan 28, 2020
@kmaehashi kmaehashi assigned toslunar and unassigned kmaehashi Feb 6, 2020
Copy link
Copy Markdown
Member

@toslunar toslunar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toslunar
Copy link
Copy Markdown
Member

toslunar commented Feb 6, 2020

Jenkins, test this please.

@pfn-ci-bot
Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 228c256:

@chainer-ci
Copy link
Copy Markdown
Member

Jenkins CI test (for commit 228c256, target branch master) succeeded!

@toslunar toslunar merged commit 6ffa610 into cupy:master Feb 6, 2020
toslunar added a commit to toslunar/cupy that referenced this pull request Feb 6, 2020
@niboshi niboshi deleted the fix-imag-0-size branch February 6, 2020 07:48
@toslunar toslunar changed the title Fix imag for 0-size array Fix imag for 0-size array Feb 14, 2020
@chainer-ci
Copy link
Copy Markdown
Member

Jenkins CI test (for commit 228c256, target branch master) failed with status FAILURE.

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

Labels

cat:bug Bugs to-be-backported Pull-requests to be backported to stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complex imag causes error for 0-size array

5 participants