Skip to content

np.diagonal implementation - #4431

Merged
jcrist merged 3 commits into
dask:masterfrom
horta:diagonal
Feb 19, 2019
Merged

jcrist merged 3 commits into
dask:masterfrom
horta:diagonal

Conversation

@horta

@horta horta commented Jan 28, 2019

Copy link
Copy Markdown
Contributor
  • Tests added / passed
  • Passes flake8 dask

I couldn't make assert sorted(da.diagonal(v).dask) == sorted(da.diagonal(v).dask) work. The calls seems to be deterministic but it cannot sort the graph because tuple and str are not comparable. Shall I just remove it?

I would like to see da.diagonal implemented mainly because of da.trace, which will become easy to implement once this is done.

@horta

horta commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

Checklist: #2911

@mrocklin

Copy link
Copy Markdown
Member

cc @jakirkham , this may interest you

@mrocklin

Copy link
Copy Markdown
Member

@shoyer or @jrbourbeau any interest in reviewing this?

@jrbourbeau

Copy link
Copy Markdown
Member

Yeah, I'll have some time to look at this tomorrow 👍

@mrocklin

mrocklin commented Jan 31, 2019 via email

Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this PR @horta! I've attached a few comments and questions. In particular, I was wondering about the internal rechunk-ing that would happen for a large input Dask array

Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
Comment thread dask/array/tests/test_creation.py Resolved
Comment thread dask/array/tests/test_creation.py Resolved
Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
@mrocklin

mrocklin commented Feb 6, 2019

Copy link
Copy Markdown
Member

Checking in on this @horta . Is there any other information you need in order to move forward? It would be great to see this go in.

@horta

horta commented Feb 6, 2019

Copy link
Copy Markdown
Contributor Author

No need for more information. I will get it going tomorrow!

Comment thread dask/array/tests/test_creation.py Resolved
Comment thread dask/array/tests/test_creation.py Resolved
@horta

horta commented Feb 9, 2019

Copy link
Copy Markdown
Contributor Author

*working on that

Comment thread dask/array/creation.py Resolved
@jakirkham

Copy link
Copy Markdown
Member

This looks pretty good to me. There are a few comments above, but nothing too difficult I hope.

Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
@jakirkham

Copy link
Copy Markdown
Member

This is coming along nicely, @horta. Will give it another look after you have some time to address the remaining comments. Probably one or two tidy up things in the next (last) iteration I think.

Comment thread dask/array/creation.py Resolved
Comment thread dask/array/creation.py Resolved
@jakirkham

Copy link
Copy Markdown
Member

Thanks for the updates @horta. Added a couple comments above. Otherwise LGTM. @shoyer @mrocklin, any other thoughts?

@horta

horta commented Feb 14, 2019

Copy link
Copy Markdown
Contributor Author

Thanks, @jakirkham .

@mrocklin

Copy link
Copy Markdown
Member

@jakirkham if you're comfortable with this PR then I encourage you to merge (I'm trying to get more people to become comfortable with pressing the green button).

@jcrist

jcrist commented Feb 19, 2019

Copy link
Copy Markdown
Member

Thanks @horta, merging!

@jcrist
jcrist merged commit faefaa8 into dask:master Feb 19, 2019
@jakirkham

Copy link
Copy Markdown
Member

@mrocklin, as I'd requested feedback from others right before the 3-day weekend, figured I'd wait to see if I heard back this week to give people some time before clicking the merge button.

@mrocklin

mrocklin commented Feb 19, 2019 via email

Copy link
Copy Markdown
Member

@jakirkham

Copy link
Copy Markdown
Member

No worries. Thanks for the encouragement.

@jakirkham

Copy link
Copy Markdown
Member

Just out of curiosity, @horta, were you planning on implementing da.trace as well? Asking since you had mentioned it in the OP. :)

@horta

horta commented Apr 4, 2019

Copy link
Copy Markdown
Contributor Author

@jakirkham sure, I aim to implement that by sunday

jorge-pessoa pushed a commit to jorge-pessoa/dask that referenced this pull request May 14, 2019
* da.diagonal

* no need for asarray

* Direct asarray and use of np.diagonal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants