Skip to content

Conversation

@kaka1992
Copy link
Contributor

Add a new Vectors.sparse(arr: Array[Double])

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@mengxr
Copy link
Contributor

mengxr commented Apr 29, 2015

@kaka1992 I don't see why this is useful. Creating a dense vector directly is certainly more efficient.

@kaka1992
Copy link
Contributor Author

@mengxr Just provide a way to turn DeseV to SparseV easily. Somebody may need this.

@mengxr
Copy link
Contributor

mengxr commented Apr 29, 2015

See #5756. Users should be able to write Vectors.dense(1.0, 0.0, 3.0).toSparse.

@kaka1992
Copy link
Contributor Author

@mengxr Ok, I'll close this pr.

@kaka1992 kaka1992 closed this Apr 29, 2015
@srowen
Copy link
Member

srowen commented Apr 29, 2015

@kaka1992 this wasn't quite the proposal in the JIRA anyway; it had to do with accepting either order of tuple.

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.

4 participants