Skip to content

Conversation

@rok
Copy link
Member

@rok rok commented Jul 2, 2019

This is to resolve ARROW-4223.

@kszucs kszucs changed the title ARROW-4223 [Python] Support scipy.sparse integration ARROW-4223: [Python] Support scipy.sparse integration Jul 4, 2019
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

@rok I know the PR is still indicated as draft, so all comments I made you probably were still going to do, but while looking at the diff, thought to at once comment

@rok rok force-pushed the ARROW-4223 branch 2 times, most recently from 5b7472b to eca7a70 Compare July 8, 2019 21:51
@rok rok force-pushed the ARROW-4223 branch 10 times, most recently from ff60f58 to 75097f7 Compare July 20, 2019 16:50
@rok rok marked this pull request as ready for review July 20, 2019 17:02
@rok
Copy link
Member Author

rok commented Jul 20, 2019

I think this is ready for review.
Appveyor seems to be failing on unrelated issue.

@rok rok force-pushed the ARROW-4223 branch 2 times, most recently from 081032b to 2ca9ed7 Compare July 22, 2019 18:12
@rok rok force-pushed the ARROW-4223 branch 5 times, most recently from 15b973e to ebbbdf2 Compare July 28, 2019 23:44
@rok rok force-pushed the ARROW-4223 branch 2 times, most recently from d812904 to 54ad5ad Compare November 11, 2019 19:40
@rok
Copy link
Member Author

rok commented Nov 11, 2019

@ursabot build

@rok
Copy link
Member Author

rok commented Nov 11, 2019

@pitrou I think this is now ready for another review round. I've updated #4990 too.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM, just one question.

Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of the astype() calls here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a workaround for scipy bug (or lack of feature) see this issue.

Copy link
Member

Choose a reason for hiding this comment

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

But you have if dtype_str != 'f2' above.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, yeah.. this probably should have failed. That's odd. I'll look into it tonight.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

minor nit

Copy link
Member

Choose a reason for hiding this comment

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

Could check here that the passed object is actually a scipy.sparse.coo_matrix ?
(right now the user will probably get an attribute error if you pass a different scipy matrix type)

(and the same for the other from_scipy below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you :)

@pitrou
Copy link
Member

pitrou commented Nov 13, 2019

The R download failure on AppVeyor is unrelated, merging.

@pitrou pitrou closed this in cdaf988 Nov 13, 2019
@rok
Copy link
Member Author

rok commented Nov 13, 2019

Thanks @pitrou @mrkn and @jorisvandenbossche! :)

@rok rok deleted the ARROW-4223 branch November 13, 2019 10:39
pitrou pushed a commit that referenced this pull request Nov 13, 2019
This is to resolve [ARROW-4224](https://issues.apache.org/jira/browse/ARROW-4224).

Please note this requires #4779 to be reviewed and merged first.

Closes #4990 from rok/ARROW-4224 and squashes the following commits:

d99d52d <Rok> Implementing review feedback.
4efdd35 <Rok> Adding type check to from_pydata_sparse.
759e0b3 <Rok> Adding from_pydata_sparse and to_pydata_sparse.

Authored-by: Rok <rok@mihevc.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
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.

5 participants