spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kumar <manojkumarsivaraj...@gmail.com>
Subject Accessing indices and values in SparseVector
Date Tue, 03 Feb 2015 12:17:22 GMT
Hello,

This is related to one of the issues that I'm working on. I am not sure if
this is expected behavior or not.

This works fine.
val sv2 = new SparseVector(3, Array(0, 2), Array(1.1, 3.0))
sv2.indices

But when I do this
val sv2: Vector = Vectors.sparse(3, Array(0, 2), Array(1.1, 3.0))
sv2.indices

It raises an error.

If agreed that this is not expected, I can send a Pull Request.
Thanks.



-- 
Godspeed,
Manoj Kumar,
http://manojbits.wordpress.com
<http://goog_1017110195>
http://github.com/MechCoder

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message